test

package
v0.0.0-...-c1b05a4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 25 Imported by: 0

README

Automated test for token transfer from A -> B:

go test -run TestSubmitBlock

WIP: Automated test for token transfer from A -> contract -> B.

Documentation

Index

Constants

View Source
const ERC20ABI = "" /* 3312-byte string literal not displayed */

ERC20ABI is the input ABI used to generate the binding from.

View Source
const ERC20Bin = `` /* 3854-byte string literal not displayed */

ERC20Bin is the compiled bytecode used for deploying new contracts.

View Source
const ERC20InterfaceABI = "" /* 2048-byte string literal not displayed */

ERC20InterfaceABI is the input ABI used to generate the binding from.

View Source
const ERC20InterfaceBin = `0x`

ERC20InterfaceBin is the compiled bytecode used for deploying new contracts.

Variables

This section is empty.

Functions

func DepositAndTransfer

func DepositAndTransfer(
	ctx context.Context,
	conn *ethclient.Client,
	mapperAuth *bind.TransactOpts,
	auth1 *bind.TransactOpts,
	auth2 *bind.TransactOpts,
	token common.Address,
	auth1PrivateKey *ecdsa.PrivateKey,
)

func MapToken

func MapToken(
	ctx context.Context,
	conn *ethclient.Client,
	auth *bind.TransactOpts,
	token common.Address,
	name string,
	symbol string,
	decimals uint8,
)

func RegisterToken

func RegisterToken(ctx context.Context, conn *ethclient.Client, auth *bind.TransactOpts, tokenAddress common.Address)

func RunTokenMapper

func RunTokenMapper(
	mainchainKeystore string,
	sidechainKeystore string,
	user0Keystore string,
	user1Keystore string,
)

func SetupConfig

func SetupConfig() error

func StartChain

func StartChain(
	networkId int,
	chainDataDir string,
	logFilename string,
	genesis string,
	etherbase string,
	port int,
	rpcPort int,
	wsPort int,
) (*os.Process, error)

func StartMainchain

func StartMainchain() (*os.Process, error)

func StartSidechain

func StartSidechain() (*os.Process, error)

Types

type ERC20

type ERC20 struct {
	ERC20Caller     // Read-only binding to the contract
	ERC20Transactor // Write-only binding to the contract
	ERC20Filterer   // Log filterer for contract events
}

ERC20 is an auto generated Go binding around an Ethereum contract.

func DeployERC20

func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend, _initialAmount *big.Int, _tokenName string, _decimalUnits uint8, _tokenSymbol string) (common.Address, *types.Transaction, *ERC20, error)

DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it.

func NewERC20

func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error)

NewERC20 creates a new instance of ERC20, bound to a specific deployed contract.

type ERC20Approval

type ERC20Approval struct {
	Owner   common.Address
	Spender common.Address
	Value   *big.Int
	Raw     types.Log // Blockchain specific contextual infos
}

ERC20Approval represents a Approval event raised by the ERC20 contract.

type ERC20ApprovalIterator

type ERC20ApprovalIterator struct {
	Event *ERC20Approval // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract.

func (*ERC20ApprovalIterator) Close

func (it *ERC20ApprovalIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*ERC20ApprovalIterator) Error

func (it *ERC20ApprovalIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*ERC20ApprovalIterator) Next

func (it *ERC20ApprovalIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type ERC20Caller

type ERC20Caller struct {
	// contains filtered or unexported fields
}

ERC20Caller is an auto generated read-only Go binding around an Ethereum contract.

func NewERC20Caller

func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error)

NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract.

func (*ERC20Caller) Allowance

func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(remaining uint256)

func (*ERC20Caller) Allowed

func (_ERC20 *ERC20Caller) Allowed(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error)

Allowed is a free data retrieval call binding the contract method 0x5c658165.

Solidity: function allowed( address, address) constant returns(uint256)

func (*ERC20Caller) BalanceOf

func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(balance uint256)

func (*ERC20Caller) Balances

func (_ERC20 *ERC20Caller) Balances(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error)

Balances is a free data retrieval call binding the contract method 0x27e235e3.

Solidity: function balances( address) constant returns(uint256)

func (*ERC20Caller) Decimals

func (_ERC20 *ERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() constant returns(uint8)

func (*ERC20Caller) Name

func (_ERC20 *ERC20Caller) Name(opts *bind.CallOpts) (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*ERC20Caller) Symbol

func (_ERC20 *ERC20Caller) Symbol(opts *bind.CallOpts) (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*ERC20Caller) TotalSupply

func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

type ERC20CallerRaw

type ERC20CallerRaw struct {
	Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on
}

ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*ERC20CallerRaw) Call

func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type ERC20CallerSession

type ERC20CallerSession struct {
	Contract *ERC20Caller  // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*ERC20CallerSession) Allowance

func (_ERC20 *ERC20CallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(remaining uint256)

func (*ERC20CallerSession) Allowed

func (_ERC20 *ERC20CallerSession) Allowed(arg0 common.Address, arg1 common.Address) (*big.Int, error)

Allowed is a free data retrieval call binding the contract method 0x5c658165.

Solidity: function allowed( address, address) constant returns(uint256)

func (*ERC20CallerSession) BalanceOf

func (_ERC20 *ERC20CallerSession) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(balance uint256)

func (*ERC20CallerSession) Balances

func (_ERC20 *ERC20CallerSession) Balances(arg0 common.Address) (*big.Int, error)

Balances is a free data retrieval call binding the contract method 0x27e235e3.

Solidity: function balances( address) constant returns(uint256)

func (*ERC20CallerSession) Decimals

func (_ERC20 *ERC20CallerSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() constant returns(uint8)

func (*ERC20CallerSession) Name

func (_ERC20 *ERC20CallerSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*ERC20CallerSession) Symbol

func (_ERC20 *ERC20CallerSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*ERC20CallerSession) TotalSupply

func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

type ERC20Filterer

type ERC20Filterer struct {
	// contains filtered or unexported fields
}

ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewERC20Filterer

func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error)

NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract.

func (*ERC20Filterer) FilterApproval

func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, _owner []common.Address, _spender []common.Address) (*ERC20ApprovalIterator, error)

FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: e Approval(_owner indexed address, _spender indexed address, _value uint256)

func (*ERC20Filterer) FilterTransfer

func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, _from []common.Address, _to []common.Address) (*ERC20TransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: e Transfer(_from indexed address, _to indexed address, _value uint256)

func (*ERC20Filterer) WatchApproval

func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, _owner []common.Address, _spender []common.Address) (event.Subscription, error)

WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: e Approval(_owner indexed address, _spender indexed address, _value uint256)

func (*ERC20Filterer) WatchTransfer

func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, _from []common.Address, _to []common.Address) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: e Transfer(_from indexed address, _to indexed address, _value uint256)

type ERC20Interface

type ERC20Interface struct {
	ERC20InterfaceCaller     // Read-only binding to the contract
	ERC20InterfaceTransactor // Write-only binding to the contract
	ERC20InterfaceFilterer   // Log filterer for contract events
}

ERC20Interface is an auto generated Go binding around an Ethereum contract.

func DeployERC20Interface

func DeployERC20Interface(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20Interface, error)

DeployERC20Interface deploys a new Ethereum contract, binding an instance of ERC20Interface to it.

func NewERC20Interface

func NewERC20Interface(address common.Address, backend bind.ContractBackend) (*ERC20Interface, error)

NewERC20Interface creates a new instance of ERC20Interface, bound to a specific deployed contract.

type ERC20InterfaceApproval

type ERC20InterfaceApproval struct {
	Owner   common.Address
	Spender common.Address
	Value   *big.Int
	Raw     types.Log // Blockchain specific contextual infos
}

ERC20InterfaceApproval represents a Approval event raised by the ERC20Interface contract.

type ERC20InterfaceApprovalIterator

type ERC20InterfaceApprovalIterator struct {
	Event *ERC20InterfaceApproval // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

ERC20InterfaceApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Interface contract.

func (*ERC20InterfaceApprovalIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*ERC20InterfaceApprovalIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*ERC20InterfaceApprovalIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type ERC20InterfaceCaller

type ERC20InterfaceCaller struct {
	// contains filtered or unexported fields
}

ERC20InterfaceCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewERC20InterfaceCaller

func NewERC20InterfaceCaller(address common.Address, caller bind.ContractCaller) (*ERC20InterfaceCaller, error)

NewERC20InterfaceCaller creates a new read-only instance of ERC20Interface, bound to a specific deployed contract.

func (*ERC20InterfaceCaller) Allowance

func (_ERC20Interface *ERC20InterfaceCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(remaining uint256)

func (*ERC20InterfaceCaller) BalanceOf

func (_ERC20Interface *ERC20InterfaceCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(balance uint256)

func (*ERC20InterfaceCaller) TotalSupply

func (_ERC20Interface *ERC20InterfaceCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

type ERC20InterfaceCallerRaw

type ERC20InterfaceCallerRaw struct {
	Contract *ERC20InterfaceCaller // Generic read-only contract binding to access the raw methods on
}

ERC20InterfaceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*ERC20InterfaceCallerRaw) Call

func (_ERC20Interface *ERC20InterfaceCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type ERC20InterfaceCallerSession

type ERC20InterfaceCallerSession struct {
	Contract *ERC20InterfaceCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts         // Call options to use throughout this session
}

ERC20InterfaceCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*ERC20InterfaceCallerSession) Allowance

func (_ERC20Interface *ERC20InterfaceCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(remaining uint256)

func (*ERC20InterfaceCallerSession) BalanceOf

func (_ERC20Interface *ERC20InterfaceCallerSession) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(balance uint256)

func (*ERC20InterfaceCallerSession) TotalSupply

func (_ERC20Interface *ERC20InterfaceCallerSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

type ERC20InterfaceFilterer

type ERC20InterfaceFilterer struct {
	// contains filtered or unexported fields
}

ERC20InterfaceFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewERC20InterfaceFilterer

func NewERC20InterfaceFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20InterfaceFilterer, error)

NewERC20InterfaceFilterer creates a new log filterer instance of ERC20Interface, bound to a specific deployed contract.

func (*ERC20InterfaceFilterer) FilterApproval

func (_ERC20Interface *ERC20InterfaceFilterer) FilterApproval(opts *bind.FilterOpts, _owner []common.Address, _spender []common.Address) (*ERC20InterfaceApprovalIterator, error)

FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: e Approval(_owner indexed address, _spender indexed address, _value uint256)

func (*ERC20InterfaceFilterer) FilterTransfer

func (_ERC20Interface *ERC20InterfaceFilterer) FilterTransfer(opts *bind.FilterOpts, _from []common.Address, _to []common.Address) (*ERC20InterfaceTransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: e Transfer(_from indexed address, _to indexed address, _value uint256)

func (*ERC20InterfaceFilterer) WatchApproval

func (_ERC20Interface *ERC20InterfaceFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20InterfaceApproval, _owner []common.Address, _spender []common.Address) (event.Subscription, error)

WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: e Approval(_owner indexed address, _spender indexed address, _value uint256)

func (*ERC20InterfaceFilterer) WatchTransfer

func (_ERC20Interface *ERC20InterfaceFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20InterfaceTransfer, _from []common.Address, _to []common.Address) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: e Transfer(_from indexed address, _to indexed address, _value uint256)

type ERC20InterfaceRaw

type ERC20InterfaceRaw struct {
	Contract *ERC20Interface // Generic contract binding to access the raw methods on
}

ERC20InterfaceRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*ERC20InterfaceRaw) Call

func (_ERC20Interface *ERC20InterfaceRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*ERC20InterfaceRaw) Transact

func (_ERC20Interface *ERC20InterfaceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ERC20InterfaceRaw) Transfer

func (_ERC20Interface *ERC20InterfaceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ERC20InterfaceSession

type ERC20InterfaceSession struct {
	Contract     *ERC20Interface   // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

ERC20InterfaceSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*ERC20InterfaceSession) Allowance

func (_ERC20Interface *ERC20InterfaceSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(remaining uint256)

func (*ERC20InterfaceSession) Approve

func (_ERC20Interface *ERC20InterfaceSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(success bool)

func (*ERC20InterfaceSession) BalanceOf

func (_ERC20Interface *ERC20InterfaceSession) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(balance uint256)

func (*ERC20InterfaceSession) TotalSupply

func (_ERC20Interface *ERC20InterfaceSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

func (*ERC20InterfaceSession) Transfer

func (_ERC20Interface *ERC20InterfaceSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(success bool)

func (*ERC20InterfaceSession) TransferFrom

func (_ERC20Interface *ERC20InterfaceSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(success bool)

type ERC20InterfaceTransactor

type ERC20InterfaceTransactor struct {
	// contains filtered or unexported fields
}

ERC20InterfaceTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewERC20InterfaceTransactor

func NewERC20InterfaceTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20InterfaceTransactor, error)

NewERC20InterfaceTransactor creates a new write-only instance of ERC20Interface, bound to a specific deployed contract.

func (*ERC20InterfaceTransactor) Approve

func (_ERC20Interface *ERC20InterfaceTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(success bool)

func (*ERC20InterfaceTransactor) Transfer

func (_ERC20Interface *ERC20InterfaceTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(success bool)

func (*ERC20InterfaceTransactor) TransferFrom

func (_ERC20Interface *ERC20InterfaceTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(success bool)

type ERC20InterfaceTransactorRaw

type ERC20InterfaceTransactorRaw struct {
	Contract *ERC20InterfaceTransactor // Generic write-only contract binding to access the raw methods on
}

ERC20InterfaceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*ERC20InterfaceTransactorRaw) Transact

func (_ERC20Interface *ERC20InterfaceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ERC20InterfaceTransactorRaw) Transfer

func (_ERC20Interface *ERC20InterfaceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ERC20InterfaceTransactorSession

type ERC20InterfaceTransactorSession struct {
	Contract     *ERC20InterfaceTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts         // Transaction auth options to use throughout this session
}

ERC20InterfaceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*ERC20InterfaceTransactorSession) Approve

func (_ERC20Interface *ERC20InterfaceTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(success bool)

func (*ERC20InterfaceTransactorSession) Transfer

func (_ERC20Interface *ERC20InterfaceTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(success bool)

func (*ERC20InterfaceTransactorSession) TransferFrom

func (_ERC20Interface *ERC20InterfaceTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(success bool)

type ERC20InterfaceTransfer

type ERC20InterfaceTransfer struct {
	From  common.Address
	To    common.Address
	Value *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

ERC20InterfaceTransfer represents a Transfer event raised by the ERC20Interface contract.

type ERC20InterfaceTransferIterator

type ERC20InterfaceTransferIterator struct {
	Event *ERC20InterfaceTransfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

ERC20InterfaceTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Interface contract.

func (*ERC20InterfaceTransferIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*ERC20InterfaceTransferIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*ERC20InterfaceTransferIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type ERC20Raw

type ERC20Raw struct {
	Contract *ERC20 // Generic contract binding to access the raw methods on
}

ERC20Raw is an auto generated low-level Go binding around an Ethereum contract.

func (*ERC20Raw) Call

func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*ERC20Raw) Transact

func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ERC20Raw) Transfer

func (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ERC20Session

type ERC20Session struct {
	Contract     *ERC20            // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

ERC20Session is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*ERC20Session) Allowance

func (_ERC20 *ERC20Session) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(remaining uint256)

func (*ERC20Session) Allowed

func (_ERC20 *ERC20Session) Allowed(arg0 common.Address, arg1 common.Address) (*big.Int, error)

Allowed is a free data retrieval call binding the contract method 0x5c658165.

Solidity: function allowed( address, address) constant returns(uint256)

func (*ERC20Session) Approve

func (_ERC20 *ERC20Session) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(success bool)

func (*ERC20Session) BalanceOf

func (_ERC20 *ERC20Session) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(balance uint256)

func (*ERC20Session) Balances

func (_ERC20 *ERC20Session) Balances(arg0 common.Address) (*big.Int, error)

Balances is a free data retrieval call binding the contract method 0x27e235e3.

Solidity: function balances( address) constant returns(uint256)

func (*ERC20Session) Decimals

func (_ERC20 *ERC20Session) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() constant returns(uint8)

func (*ERC20Session) Name

func (_ERC20 *ERC20Session) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*ERC20Session) Symbol

func (_ERC20 *ERC20Session) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*ERC20Session) TotalSupply

func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

func (*ERC20Session) Transfer

func (_ERC20 *ERC20Session) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(success bool)

func (*ERC20Session) TransferFrom

func (_ERC20 *ERC20Session) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(success bool)

type ERC20Transactor

type ERC20Transactor struct {
	// contains filtered or unexported fields
}

ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.

func NewERC20Transactor

func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error)

NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract.

func (*ERC20Transactor) Approve

func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(success bool)

func (*ERC20Transactor) Transfer

func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(success bool)

func (*ERC20Transactor) TransferFrom

func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(success bool)

type ERC20TransactorRaw

type ERC20TransactorRaw struct {
	Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on
}

ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*ERC20TransactorRaw) Transact

func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ERC20TransactorRaw) Transfer

func (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ERC20TransactorSession

type ERC20TransactorSession struct {
	Contract     *ERC20Transactor  // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*ERC20TransactorSession) Approve

func (_ERC20 *ERC20TransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(success bool)

func (*ERC20TransactorSession) Transfer

func (_ERC20 *ERC20TransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(success bool)

func (*ERC20TransactorSession) TransferFrom

func (_ERC20 *ERC20TransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(success bool)

type ERC20Transfer

type ERC20Transfer struct {
	From  common.Address
	To    common.Address
	Value *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

ERC20Transfer represents a Transfer event raised by the ERC20 contract.

type ERC20TransferIterator

type ERC20TransferIterator struct {
	Event *ERC20Transfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract.

func (*ERC20TransferIterator) Close

func (it *ERC20TransferIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*ERC20TransferIterator) Error

func (it *ERC20TransferIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*ERC20TransferIterator) Next

func (it *ERC20TransferIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type MainchainContractAddresses

type MainchainContractAddresses struct {
	AccountRegistry        common.Address `yaml:"accountRegistry"`
	TokenRegistry          common.Address `yaml:"tokenRegistry"`
	ValidatorRegistry      common.Address `yaml:"validatorRegistry"`
	RollupChain            common.Address `yaml:"rollupChain"`
	MerkleUtils            common.Address `yaml:"merkleUtils"`
	DepositWithdrawManager common.Address `yaml:"depositWithdrawManager"`
	TransitionEvaluator    common.Address `yaml:"transitionEvaluator"`
	TestToken              common.Address `yaml:"testToken"`
}

func DeployMainchainContracts

func DeployMainchainContracts() *MainchainContractAddresses

type SidechainContractAddresses

type SidechainContractAddresses struct {
	TokenMapper    common.Address `yaml:"tokenMapper"`
	BlockCommittee common.Address `yaml:"blockCommittee"`
}

func DeploySidechainContracts

func DeploySidechainContracts() *SidechainContractAddresses

type TestTokenInfo

type TestTokenInfo struct {
	TestTokenAddress  common.Address `yaml:"testTokenAddress"`
	TestTokenSymbol   string         `yaml:"testTokenSymbol"`
	TestTokenName     string         `yaml:"testTokenName"`
	TestTokenDecimals uint8          `yaml:"testTokenDecimals"`
}

Directories

Path Synopsis
manual

Jump to

Keyboard shortcuts

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