Documentation
¶
Index ¶
- type L1Manager
- func (l1Manager *L1Manager) MustTransferToChain(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, ...)
- func (l1Manager *L1Manager) MustTransferToChainToSelf(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, ...)
- func (l1Manager *L1Manager) MustTransferToContract(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, ...)
- func (l1Manager *L1Manager) RequireAddressBalance(address ledgerstate.Address, color colored.Color, expectedBalance uint64)
- func (l1Manager *L1Manager) RequireBalance(keyPair *ed25519.KeyPair, color colored.Color, expectedBalance uint64)
- func (l1Manager *L1Manager) TransferToChain(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, ...) error
- func (l1Manager *L1Manager) TransferToChainToSelf(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, ...) error
- func (l1Manager *L1Manager) TransferToContract(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type L1Manager ¶
type L1Manager struct {
// contains filtered or unexported fields
}
L1Manager manipulates chains.
func (*L1Manager) MustTransferToChain ¶
func (l1Manager *L1Manager) MustTransferToChain(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, transferAmount uint64, receiverKeyPair *ed25519.KeyPair)
MustTransferToChain makes transfer of 'amount' of 'color' from the depositors account in L1 to the receivers account in 'chain'. Transfers to 'depositor' if no receiver is defined. Fails test on error.
func (*L1Manager) MustTransferToChainToSelf ¶
func (l1Manager *L1Manager) MustTransferToChainToSelf(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, amount uint64)
MustTransferToChainToSelf makes transfer of 'amount' of 'color' from the depositors account in L1 to the depositors account in 'chain'. Fails test on error.
func (*L1Manager) MustTransferToContract ¶
func (l1Manager *L1Manager) MustTransferToContract(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, transferAmount uint64, contractName string)
MustTransferToContract makes transfer of 'amount' of 'color' from the depositors account in L1 to the contract's account in 'chain'. Nothing is transfered if no contract is neither defined nor found. Fails test on error.
func (*L1Manager) RequireAddressBalance ¶
func (l1Manager *L1Manager) RequireAddressBalance(address ledgerstate.Address, color colored.Color, expectedBalance uint64)
RequireAddressBalance verifies if the address has the expected balance of 'color' in L1. Fails test if balance is not equal to expectedBalance.
func (*L1Manager) RequireBalance ¶
func (l1Manager *L1Manager) RequireBalance(keyPair *ed25519.KeyPair, color colored.Color, expectedBalance uint64)
RequireBalance verifies if the key pair has the expected balance of 'color' in L1. Fails test if balance is not equal to expectedBalance.
func (*L1Manager) TransferToChain ¶
func (l1Manager *L1Manager) TransferToChain(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, transferAmount uint64, receiverKeyPair *ed25519.KeyPair) error
TransferToChain makes transfer of 'amount' of 'color' from the depositors account in L1 to the receivers account in 'chain'. Transfers to 'depositor' if no receiver is defined.
func (*L1Manager) TransferToChainToSelf ¶
func (l1Manager *L1Manager) TransferToChainToSelf(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, amount uint64) error
TransferToChainToSelf makes transfer of 'amount' of 'color' from the depositors account in L1 to the depositors account in 'chain'.
func (*L1Manager) TransferToContract ¶
func (l1Manager *L1Manager) TransferToContract(depositorKeyPair *ed25519.KeyPair, chain *solo.Chain, color colored.Color, transferAmount uint64, contractName string) error
TransferToContract makes transfer of 'amount' of 'color' from the depositors account in L1 to the contract's account in 'chain'. Nothing is transfered if no contract is neither defined nor found.