public class ContractUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ADDRESS_BYTE_SIZE |
static int |
SALT_SIZE |
| Constructor and Description |
|---|
ContractUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
generateContractAddress(byte[] address,
java.math.BigInteger nonce)
Generate a smart contract address.
|
static java.lang.String |
generateContractAddress(java.lang.String address,
java.math.BigInteger nonce) |
static byte[] |
generateCreate2ContractAddress(byte[] address,
byte[] salt,
byte[] initCode)
Generate a CREATE2 smart contract address.
|
static java.lang.String |
generateCreate2ContractAddress(java.lang.String address,
byte[] salt,
byte[] initCode) |
public static final int SALT_SIZE
public static final int ADDRESS_BYTE_SIZE
public static byte[] generateContractAddress(byte[] address,
java.math.BigInteger nonce)
address - of sendernonce - of transactionpublic static java.lang.String generateContractAddress(java.lang.String address,
java.math.BigInteger nonce)
public static byte[] generateCreate2ContractAddress(byte[] address,
byte[] salt,
byte[] initCode)
address - The address which is creating this new addresssalt - A 32 bytes saltinitCode - The init code of the contract being createdpublic static java.lang.String generateCreate2ContractAddress(java.lang.String address,
byte[] salt,
byte[] initCode)