private static FunctionABI GetNethFunctionAbi(AbiFunctionDefinition definition) { return(new FunctionABI(definition.Name, definition.Constant) { InputParameters = GetNethParameters(definition.Inputs), OutputParameters = GetNethParameters(definition.Outputs) }); }
public static AbiFunctionDefinition Builder(JToken abiJson) { var definition = new AbiFunctionDefinition { Name = abiJson["name"].ToString(), Constant = (bool)abiJson["constant"], Payable = (bool)abiJson["payable"] }; Enum.TryParse(abiJson["stateMutability"].ToString(), true, out AbiStateMutability stateMutability); definition.StateMutability = stateMutability; definition.Inputs = AbiParameterBuilder.Builder(abiJson["inputs"].ToString()); definition.Outputs = AbiParameterBuilder.Builder(abiJson["outputs"].ToString()); definition.Sha3Signature = GetNethFunctionAbi(definition).Sha3Signature.ToBytes(); return(definition); }
public AbiFunctionCoder(AbiFunctionDefinition definition) { _definition = definition; }
public AbiFunctionCoder(string abiJson) { _definition = AbiFunctionDefinition.Builder(abiJson); }