Created
February 16, 2018 19:21
-
-
Save strotter/c91c9610dbacc5d0ae96014daf9658bb to your computer and use it in GitHub Desktop.
web3j
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public RemoteCall<TransactionReceipt> stop() { | |
Function function = new Function( | |
"stop", | |
Arrays.<Type>asList(), | |
Collections.<TypeReference<?>>emptyList()); | |
return executeRemoteCallTransaction(function); | |
} | |
public RemoteCall<TransactionReceipt> approve(String _spender, BigInteger _value) { | |
Function function = new Function( | |
"approve", | |
Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(_spender), | |
new org.web3j.abi.datatypes.generated.Uint256(_value)), | |
Collections.<TypeReference<?>>emptyList()); | |
return executeRemoteCallTransaction(function); | |
} | |
public RemoteCall<BigInteger> totalSupply() { | |
Function function = new Function("totalSupply", | |
Arrays.<Type>asList(), | |
Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); | |
return executeRemoteCallSingleValueReturn(function, BigInteger.class); | |
} | |
public RemoteCall<TransactionReceipt> transferFrom(String _from, String _to, BigInteger _value) { | |
Function function = new Function( | |
"transferFrom", | |
Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(_from), | |
new org.web3j.abi.datatypes.Address(_to), | |
new org.web3j.abi.datatypes.generated.Uint256(_value)), | |
Collections.<TypeReference<?>>emptyList()); | |
return executeRemoteCallTransaction(function); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment