/** * Method creates {@link FollowerContract} contract from dsl file where contract is described. * * @param fileName is path to dsl file with yaml structure of data for contract. * @return created and ready {@link FollowerContract} contract. * @throws IOException if something went wrong */ public static FollowerContract fromDslFile(String fileName) throws IOException { Yaml yaml = new Yaml(); try (FileReader r = new FileReader(fileName)) { Binder binder = Binder.from(DefaultBiMapper.deserialize((Map) yaml.load(r))); return new FollowerContract().initializeWithDsl(binder); } }
contract = new FollowerContract(bb, this); break;
c = new FollowerContract(b.toArray(), this); break;
PublicKey callbackKey = privateKey.getPublicKey(); Contract smartContract = new FollowerContract(key);
PublicKey callbackKey = privateKey.getPublicKey(); Contract smartContract = new FollowerContract(key);
FollowerContract followerContract = new FollowerContract(); followerContract.setNodeInfoProvider(nodeInfoProvider); followerContract.setApiLevel(3);
PublicKey callbackKey = privateKey.getPublicKey(); Contract smartContract = new FollowerContract(key);
FollowerContract followerContract = new FollowerContract(followerKey);
FollowerContract smartContract = new FollowerContract(key); assertTrue(smartContract instanceof FollowerContract);