-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: tonykwok1992 <[email protected]>
- Loading branch information
1 parent
45540b9
commit 8d9e8ee
Showing
6 changed files
with
125 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
pragma solidity >= 0.8.7; | ||
|
||
contract AbiFuncs { | ||
|
||
|
||
function hi(uint256 x) public { | ||
|
||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
codegen/src/test/resources/solidity/abifuncs/build/AbiFuncs.abi
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"hi","outputs":[],"stateMutability":"nonpayable","type":"function"}] |
1 change: 1 addition & 0 deletions
1
codegen/src/test/resources/solidity/abifuncs/build/AbiFuncs.bin
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
608060405234801561000f575f80fd5b5060d38061001c5f395ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c80634cf1b41d14602a575b5f80fd5b60406004803603810190603c91906077565b6042565b005b50565b5f80fd5b5f819050919050565b6059816049565b81146062575f80fd5b50565b5f813590506071816052565b92915050565b5f6020828403121560895760886045565b5b5f6094848285016065565b9150509291505056fea2646970667358221220e788c40f4c54add124e8c2662f9bc92e122a1ea722846a0a855e1ffb68cbdac564736f6c63430008140033 |
91 changes: 91 additions & 0 deletions
91
codegen/src/test/resources/solidity/abifuncs/build/java/AbiFuncs.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package org.web3j.unittests.java; | ||
|
||
import java.math.BigInteger; | ||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import org.web3j.abi.TypeReference; | ||
import org.web3j.abi.datatypes.Function; | ||
import org.web3j.abi.datatypes.Type; | ||
import org.web3j.crypto.Credentials; | ||
import org.web3j.protocol.Web3j; | ||
import org.web3j.protocol.core.RemoteFunctionCall; | ||
import org.web3j.protocol.core.methods.response.TransactionReceipt; | ||
import org.web3j.tx.Contract; | ||
import org.web3j.tx.TransactionManager; | ||
import org.web3j.tx.gas.ContractGasProvider; | ||
|
||
/** | ||
* <p>Auto generated code. | ||
* <p><strong>Do not modify!</strong> | ||
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>, | ||
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the | ||
* <a href="https://github.com/web3j/web3j/tree/main/codegen">codegen module</a> to update. | ||
* | ||
* <p>Generated with web3j version none. | ||
*/ | ||
@SuppressWarnings("rawtypes") | ||
public class AbiFuncs extends Contract { | ||
public static final String BINARY = "Bin file was not provided"; | ||
|
||
public static final String FUNC_HI = "hi"; | ||
|
||
@Deprecated | ||
protected AbiFuncs(String contractAddress, Web3j web3j, Credentials credentials, | ||
BigInteger gasPrice, BigInteger gasLimit) { | ||
super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); | ||
} | ||
|
||
protected AbiFuncs(String contractAddress, Web3j web3j, Credentials credentials, | ||
ContractGasProvider contractGasProvider) { | ||
super(BINARY, contractAddress, web3j, credentials, contractGasProvider); | ||
} | ||
|
||
@Deprecated | ||
protected AbiFuncs(String contractAddress, Web3j web3j, TransactionManager transactionManager, | ||
BigInteger gasPrice, BigInteger gasLimit) { | ||
super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); | ||
} | ||
|
||
protected AbiFuncs(String contractAddress, Web3j web3j, TransactionManager transactionManager, | ||
ContractGasProvider contractGasProvider) { | ||
super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider); | ||
} | ||
|
||
public RemoteFunctionCall<TransactionReceipt> hi(BigInteger x) { | ||
final Function function = new Function( | ||
FUNC_HI, | ||
Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(x)), | ||
Collections.<TypeReference<?>>emptyList()); | ||
return executeRemoteCallTransaction(function); | ||
} | ||
|
||
public static String getABI_hi(BigInteger x) { | ||
final Function function = new Function( | ||
FUNC_HI, | ||
Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(x)), | ||
Collections.<TypeReference<?>>emptyList()); | ||
return org.web3j.abi.FunctionEncoder.encode(function); | ||
} | ||
|
||
@Deprecated | ||
public static AbiFuncs load(String contractAddress, Web3j web3j, Credentials credentials, | ||
BigInteger gasPrice, BigInteger gasLimit) { | ||
return new AbiFuncs(contractAddress, web3j, credentials, gasPrice, gasLimit); | ||
} | ||
|
||
@Deprecated | ||
public static AbiFuncs load(String contractAddress, Web3j web3j, | ||
TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { | ||
return new AbiFuncs(contractAddress, web3j, transactionManager, gasPrice, gasLimit); | ||
} | ||
|
||
public static AbiFuncs load(String contractAddress, Web3j web3j, Credentials credentials, | ||
ContractGasProvider contractGasProvider) { | ||
return new AbiFuncs(contractAddress, web3j, credentials, contractGasProvider); | ||
} | ||
|
||
public static AbiFuncs load(String contractAddress, Web3j web3j, | ||
TransactionManager transactionManager, ContractGasProvider contractGasProvider) { | ||
return new AbiFuncs(contractAddress, web3j, transactionManager, contractGasProvider); | ||
} | ||
} |