account

package
v1.9.0-tc.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const Letters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

Variables

View Source
var AlreadyDeployedErr = errors.New("contract seems to already have been deployed")
View Source
var ERC721Ledger map[common.Address]chan *big.Int // each index indicates ERC721 tokens, which the corresponding account in accGrp owns

Functions

func SetBaseFee

func SetBaseFee(bf *big.Int)

func SetChainID

func SetChainID(id *big.Int)

func SetGasPrice

func SetGasPrice(gp *big.Int)

func TransferUnsignedTx

func TransferUnsignedTx(c *client.Client, from common.Address, to common.Address, value *big.Int) (common.Hash, error)

func UnlockAccount

func UnlockAccount(c *client.Client, addr common.Address, pwd string)

Types

type AccGroup

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

func (*AccGroup) AddAcc

func (a *AccGroup) AddAcc(acc *Account)

func (*AccGroup) Get

func (a *AccGroup) Get(idx int) *Account

func (*AccGroup) GetCount

func (a *AccGroup) GetCount() int

func (*AccGroup) Load

func (a *AccGroup) Load(loader AccLoader)

type AccLoader

type AccLoader func(*AccGroup)

type AccMgr

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

func GetAccMgr

func GetAccMgr() *AccMgr

func (*AccMgr) BuildAccount

func (a *AccMgr) BuildAccount(userCnt int, cnt int)

func (*AccMgr) ChargeAccounts

func (a *AccMgr) ChargeAccounts(ctx context.Context, cli *client.Client, coinAcc *ecdsa.PrivateKey, acc *Account, nonce *uint64)

func (*AccMgr) GetGroup

func (a *AccMgr) GetGroup(idx int) *AccGroup

type Account

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

func GetAccountFromKey

func GetAccountFromKey(id int, key string) *Account

func NewAccount

func NewAccount(id int) *Account

func NewAccountOnNode

func NewAccountOnNode(id int, endpoint string) *Account

func NewAccountOnly

func NewAccountOnly(id int) *Account

func NewKlaytnAccount

func NewKlaytnAccount(id int) *Account

func NewKlaytnAccountWithAddr

func NewKlaytnAccountWithAddr(id int, addr common.Address) *Account

func NewKlaytnMultisigAccount

func NewKlaytnMultisigAccount(id int) *Account

func (*Account) AddMinter

func (self *Account) AddMinter(c *client.Client, minterCandidate *Account, smartContractAddr common.Address) (*types.Transaction, error)

func (*Account) CheckBalance

func (a *Account) CheckBalance(expectedBalance *big.Int, cli *client.Client) error

func (*Account) DeployERC20

func (self *Account) DeployERC20(c *client.Client, to *Account, value *big.Int, humanReadable bool) (common.Address, *types.Transaction, *big.Int, error)

func (*Account) DeployERC721

func (self *Account) DeployERC721(c *client.Client, to *Account, value *big.Int, humanReadable bool) (common.Address, *types.Transaction, *big.Int, error)

func (*Account) DeployStorageTrieWrite

func (self *Account) DeployStorageTrieWrite(c *client.Client, to *Account, value *big.Int, humanReadable bool) (common.Address, *types.Transaction, *big.Int, error)

func (*Account) ExecuteStorageTrieStore

func (self *Account) ExecuteStorageTrieStore(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) GetAddress

func (acc *Account) GetAddress() common.Address

func (*Account) GetBalance

func (a *Account) GetBalance(c *client.Client) (*big.Int, error)

func (*Account) GetKey

func (acc *Account) GetKey() *ecdsa.PrivateKey

func (*Account) GetNonce

func (acc *Account) GetNonce(c *client.Client) uint64

func (*Account) GetNonceFromBlock

func (acc *Account) GetNonceFromBlock(c *client.Client) uint64

func (*Account) GetPrivateKey

func (acc *Account) GetPrivateKey() string

func (*Account) GetReceipt

func (a *Account) GetReceipt(c *client.Client, txHash common.Hash) (*types.Receipt, error)

func (*Account) ImportUnLockAccount

func (account *Account) ImportUnLockAccount(endpoint string)

func (*Account) Lock

func (acc *Account) Lock()

func (*Account) MintERC721ToTestAccounts

func (self *Account) MintERC721ToTestAccounts(c *client.Client, accGrp []*Account, smartContractAddr common.Address, numInitialTokensPerAccount int)

func (*Account) TransferERC20

func (self *Account) TransferERC20(initialCharge bool, c *client.Client, tokenContractAddr common.Address, tokenRecipient *Account, value *big.Int) (*types.Transaction, *big.Int, error)

func (*Account) TransferERC721

func (self *Account) TransferERC721(initialCharge bool, c *client.Client, tokenContractAddr common.Address, tokenRecipient *Account, tokenId *big.Int) (*types.Transaction, *big.Int, error)

func (*Account) TransferNewAccountCreationTx

func (self *Account) TransferNewAccountCreationTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewAccountUpdateTx

func (self *Account) TransferNewAccountUpdateTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewCancelTx

func (self *Account) TransferNewCancelTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewEthAccessListTxWithEth

func (self *Account) TransferNewEthAccessListTxWithEth(c *client.Client, endpoint string, to *Account, value *big.Int, input string, exePath string) (common.Hash, *big.Int, error)

func (*Account) TransferNewEthDynamicFeeTxWithEth

func (self *Account) TransferNewEthDynamicFeeTxWithEth(c *client.Client, endpoint string, to *Account, value *big.Int, input string, exePath string) (common.Hash, *big.Int, error)

func (*Account) TransferNewEthereumAccessListTx

func (self *Account) TransferNewEthereumAccessListTx(c *client.Client, to *Account, value *big.Int, input []byte) (common.Hash, *big.Int, error)

func (*Account) TransferNewEthereumDynamicFeeTx

func (self *Account) TransferNewEthereumDynamicFeeTx(c *client.Client, to *Account, value *big.Int, input []byte) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedAccountUpdateTx

func (self *Account) TransferNewFeeDelegatedAccountUpdateTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedAccountUpdateWithRatioTx

func (self *Account) TransferNewFeeDelegatedAccountUpdateWithRatioTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedCancelTx

func (self *Account) TransferNewFeeDelegatedCancelTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedCancelWithRatioTx

func (self *Account) TransferNewFeeDelegatedCancelWithRatioTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedSmartContractDeployTx

func (self *Account) TransferNewFeeDelegatedSmartContractDeployTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedSmartContractDeployWithRatioTx

func (self *Account) TransferNewFeeDelegatedSmartContractDeployWithRatioTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedSmartContractExecutionTx

func (self *Account) TransferNewFeeDelegatedSmartContractExecutionTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedSmartContractExecutionWithRatioTx

func (self *Account) TransferNewFeeDelegatedSmartContractExecutionWithRatioTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedValueTransferMemoTx

func (self *Account) TransferNewFeeDelegatedValueTransferMemoTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedValueTransferMemoWithRatioTx

func (self *Account) TransferNewFeeDelegatedValueTransferMemoWithRatioTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedValueTransferTx

func (self *Account) TransferNewFeeDelegatedValueTransferTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewFeeDelegatedValueTransferWithRatioTx

func (self *Account) TransferNewFeeDelegatedValueTransferWithRatioTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewLegacyTxWithEth

func (self *Account) TransferNewLegacyTxWithEth(c *client.Client, endpoint string, to *Account, value *big.Int, input string, exePath string) (common.Hash, *big.Int, error)

func (*Account) TransferNewSmartContractDeployTx

func (self *Account) TransferNewSmartContractDeployTx(c *client.Client, to *Account, value *big.Int) (common.Address, *types.Transaction, *big.Int, error)

func (*Account) TransferNewSmartContractDeployTxHumanReadable

func (self *Account) TransferNewSmartContractDeployTxHumanReadable(c *client.Client, to *Account, value *big.Int, humanReadable bool) (common.Address, *types.Transaction, *big.Int, error)

func (*Account) TransferNewSmartContractExecutionTx

func (self *Account) TransferNewSmartContractExecutionTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewValueTransferBigRandomStringMemoTx

func (self *Account) TransferNewValueTransferBigRandomStringMemoTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewValueTransferLargeMemoTx

func (self *Account) TransferNewValueTransferLargeMemoTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

create 2000 strings of memo

func (*Account) TransferNewValueTransferMemoTx

func (self *Account) TransferNewValueTransferMemoTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewValueTransferSmallMemoTx

func (self *Account) TransferNewValueTransferSmallMemoTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

create 200 strings of memo

func (*Account) TransferNewValueTransferTx

func (self *Account) TransferNewValueTransferTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferNewValueTransferWithCancelTx

func (self *Account) TransferNewValueTransferWithCancelTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferSignedTx

func (self *Account) TransferSignedTx(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferSignedTxReturnTx

func (self *Account) TransferSignedTxReturnTx(withLock bool, c *client.Client, to *Account, value *big.Int) (*types.Transaction, *big.Int, error)

func (*Account) TransferSignedTxWithoutLock

func (self *Account) TransferSignedTxWithoutLock(c *client.Client, to *Account, value *big.Int) (common.Hash, *big.Int, error)

func (*Account) TransferUnsignedTx

func (self *Account) TransferUnsignedTx(c *client.Client, to *Account, value *big.Int) (common.Hash, error)

func (*Account) UnLock

func (acc *Account) UnLock()

func (*Account) UpdateNonce

func (acc *Account) UpdateNonce()

Jump to

Keyboard shortcuts

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