public static FunctionBuilder GetFunctionBuilderBySignature(this ContractBuilder cb, string signature) { return(new FunctionBuilder(cb.Address, cb.GetFunctionAbiBySignature(signature))); }
public static byte[] GetCallData <TContractMessage>(this TContractMessage contractMessage) where TContractMessage : ContractMessage { var contractBuilder = new ContractBuilder(typeof(TContractMessage), null); return(contractBuilder.GetFunctionBuilder <TContractMessage>().GetDataAsBytes(contractMessage)); }
/// <summary> /// Constructor. /// </summary> /// <param name="client">Client to use to communicate with the contract.</param> /// <param name="contractAddr">Address of a contract on the Loom DAppChain.</param> /// <param name="callerAddr">Address of the caller, generated from the public key of the tx signer.</param> /// <param name="abi">Contract Application Binary Interface as JSON object string.</param> public EvmContract(DAppChainClient client, Address contractAddr, Address callerAddr, string abi) : base(client, contractAddr, callerAddr) { this.contractBuilder = new ContractBuilder(abi, contractAddr.LocalAddressHexString); }