helper

package
v0.7.0-alpha1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StateSenderAddress is an address of StateSender.sol smart contract
	StateSenderAddress = types.StringToAddress("0x6FE03c2768C9d800AF3Dedf1878b5687FE120a27")
	// CheckpointManagerAddress is an address of CheckpointManager.sol smart contract
	CheckpointManagerAddress = types.StringToAddress("0x3d46A809D5767B81a8836f0E79145ba615A2Dd61")
	// BLSAddress is an address of BLS.sol smart contract
	BLSAddress = types.StringToAddress("0x72E1C51FE6dABF2e3d5701170cf5aD3620E6B8ba")
	// BN256G2Address is an address of BN256G2Address.sol smart contract
	BN256G2Address = types.StringToAddress("0x436604426F31A05f905C64edc973E575BdB46471")

	ErrRootchainNotFound = errors.New("rootchain not found")
	ErrRootchainPortBind = errors.New("port 8545 is not bind with localhost")
)

Functions

func Call

func Call(from, to ethgo.Address, input []byte) (string, error)

Call function is used to query a smart contract on given 'to' address

func ExistsCode

func ExistsCode(addr types.Address) (bool, error)

func FundAccount

func FundAccount(account types.Address) (types.Hash, error)

func GetPendingNonce

func GetPendingNonce(addr types.Address) (uint64, error)

func GetRootchainAdminAddr

func GetRootchainAdminAddr() types.Address

func GetRootchainAdminKey

func GetRootchainAdminKey() ethgo.Key

func GetRootchainID

func GetRootchainID() (string, error)

func ReadRootchainIP

func ReadRootchainIP() (string, error)

func SendTxn

func SendTxn(nonce uint64, txn *ethgo.Transaction, key ethgo.Key) (*ethgo.Receipt, error)

SendTxn function sends transaction to the rootchain blocks until receipt hash is returned

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL