Class ContractUtils


  • public class ContractUtils
    extends java.lang.Object
    Smart Contract utility functions.
    • Constructor Summary

      Constructors 
      Constructor Description
      ContractUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContractUtils

        public ContractUtils()
    • Method Detail

      • generateContractAddress

        public static byte[] generateContractAddress​(byte[] address,
                                                     java.math.BigInteger nonce)
        Generate a smart contract address. This enables you to identify what address a smart contract will be deployed to on the network.
        Parameters:
        address - of sender
        nonce - of transaction
        Returns:
        the generated smart contract address
      • generateContractAddress

        public static java.lang.String generateContractAddress​(java.lang.String address,
                                                               java.math.BigInteger nonce)