org.web3j.abi.datatypes.Function.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.web3j.abi.datatypes.Function.<init>()方法的一些代码示例,展示了Function.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Function.<init>()方法的具体详情如下:
包路径:org.web3j.abi.datatypes.Function
类名称:Function
方法名:<init>

Function.<init>介绍

暂无

代码示例

代码示例来源:origin: web3j/web3j

public RemoteCall<String> resolver(byte[] node) {
  final Function function = new Function(FUNC_RESOLVER, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node)), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}));
  return executeRemoteCallSingleValueReturn(function, String.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<String> owner(byte[] node) {
  final Function function = new Function(FUNC_OWNER, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node)), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}));
  return executeRemoteCallSingleValueReturn(function, String.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<BigInteger> ttl(byte[] node) {
  final Function function = new Function(FUNC_TTL, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node)), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Uint64>() {}));
  return executeRemoteCallSingleValueReturn(function, BigInteger.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<Boolean> supportsInterface(byte[] interfaceID) {
  final Function function = new Function(FUNC_SUPPORTSINTERFACE, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes4(interfaceID)), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
  return executeRemoteCallSingleValueReturn(function, Boolean.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<byte[]> content(byte[] node) {
  final Function function = new Function(FUNC_CONTENT, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node)), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
  return executeRemoteCallSingleValueReturn(function, byte[].class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<String> addr(byte[] node) {
  final Function function = new Function(FUNC_ADDR, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node)), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}));
  return executeRemoteCallSingleValueReturn(function, String.class);
}

代码示例来源:origin: web3j/web3j

private Function totalSupply() {
  return new Function(
      "totalSupply",
      Collections.emptyList(),
      Collections.singletonList(new TypeReference<Uint256>() {}));
}

代码示例来源:origin: web3j/web3j

public RemoteCall<TransactionReceipt> setResolver(byte[] node, String resolver) {
  final Function function = new Function(
      FUNC_SETRESOLVER, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node), 
      new org.web3j.abi.datatypes.Address(resolver)), 
      Collections.<TypeReference<?>>emptyList());
  return executeRemoteCallTransaction(function);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<BigInteger> decimals() {
  final Function function = new Function(FUNC_DECIMALS, 
      Arrays.<Type>asList(), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {}));
  return executeRemoteCallSingleValueReturn(function, BigInteger.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<String> version() {
  final Function function = new Function(FUNC_VERSION, 
      Arrays.<Type>asList(), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));
  return executeRemoteCallSingleValueReturn(function, String.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<TransactionReceipt> kill() {
  final Function function = new Function(
      FUNC_KILL, 
      Arrays.<Type>asList(), 
      Collections.<TypeReference<?>>emptyList());
  return executeRemoteCallTransaction(function);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<BigInteger> get() {
  final Function function = new Function(FUNC_GET, 
      Arrays.<Type>asList(), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
  return executeRemoteCallSingleValueReturn(function, BigInteger.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<Utf8String> callSingleValue() {
  Function function = new Function("call",
      Arrays.<Type>asList(),
      Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {
      }));
  return executeRemoteCallSingleValueReturn(function);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<TransactionReceipt> setAddr(byte[] node, String addr) {
  final Function function = new Function(
      FUNC_SETADDR, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node), 
      new org.web3j.abi.datatypes.Address(addr)), 
      Collections.<TypeReference<?>>emptyList());
  return executeRemoteCallTransaction(function);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<String> greet() {
  final Function function = new Function(FUNC_GREET, 
      Arrays.<Type>asList(), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));
  return executeRemoteCallSingleValueReturn(function, String.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<TransactionReceipt> setPubkey(byte[] node, byte[] x, byte[] y) {
  final Function function = new Function(
      FUNC_SETPUBKEY, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node), 
      new org.web3j.abi.datatypes.generated.Bytes32(x), 
      new org.web3j.abi.datatypes.generated.Bytes32(y)), 
      Collections.<TypeReference<?>>emptyList());
  return executeRemoteCallTransaction(function);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<TransactionReceipt> setText(byte[] node, String key, String value) {
  final Function function = new Function(
      FUNC_SETTEXT, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node), 
      new org.web3j.abi.datatypes.Utf8String(key), 
      new org.web3j.abi.datatypes.Utf8String(value)), 
      Collections.<TypeReference<?>>emptyList());
  return executeRemoteCallTransaction(function);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<BigInteger> getBalanceInEth(String addr) {
  final Function function = new Function(FUNC_GETBALANCEINETH, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(addr)), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
  return executeRemoteCallSingleValueReturn(function, BigInteger.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<BigInteger> fibonacci(BigInteger number) {
  final Function function = new Function(FUNC_FIBONACCI, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(number)), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
  return executeRemoteCallSingleValueReturn(function, BigInteger.class);
}

代码示例来源:origin: web3j/web3j

public RemoteCall<BigInteger> allowance(String _owner, String _spender) {
  final Function function = new Function(FUNC_ALLOWANCE, 
      Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(_owner), 
      new org.web3j.abi.datatypes.Address(_spender)), 
      Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
  return executeRemoteCallSingleValueReturn(function, BigInteger.class);
}

相关文章

微信公众号

最新文章

更多