Documentation ¶
Index ¶
- Variables
- func AwaitReceipt(ctx context.Context, client *obsclient.AuthObsClient, txHash gethcommon.Hash, ...) error
- func AwaitReceiptEth(ctx context.Context, client *ethclient.Client, txHash gethcommon.Hash, ...) (*types.Receipt, error)
- func DefaultEnclaveConfig() *config.EnclaveConfig
- func InteractWithSmartContract(client *ethclient.Client, wallet wallet.Wallet, contractAbi abi.ABI, ...) (*types.Receipt, error)
- func PrefundWallets(ctx context.Context, faucetWallet wallet.Wallet, ...)
- func RndBtw(min uint64, max uint64) uint64
- func RndBtwTime(min time.Duration, max time.Duration) time.Duration
- type ERC20
- type ERC20Mapping
Constants ¶
This section is empty.
Variables ¶
var BridgeAddress = gethcommon.BytesToAddress(gethcommon.Hex2Bytes(bridgeAddr))
BridgeAddress - address of the virtual bridge
var HOCContract = gethcommon.BytesToAddress(gethcommon.Hex2Bytes(HOCAddr))
HOCContract - address of the deployed "hocus" erc20 on the L2
var HOCOwner, _ = crypto.HexToECDSA(hocOwnerKeyHex)
var POCContract = gethcommon.BytesToAddress(gethcommon.Hex2Bytes(pocAddr))
POCContract - address of the deployed "pocus" erc20 on the L2
var POCOwner, _ = crypto.HexToECDSA(pocOwnerKeyHex)
Functions ¶
func AwaitReceipt ¶
func AwaitReceipt(ctx context.Context, client *obsclient.AuthObsClient, txHash gethcommon.Hash, timeout time.Duration) error
AwaitReceipt blocks until the receipt for the transaction with the given hash has been received. Errors if the transaction is unsuccessful or times out.
func AwaitReceiptEth ¶
func DefaultEnclaveConfig ¶ added in v0.21.0
func DefaultEnclaveConfig() *config.EnclaveConfig
DefaultEnclaveConfig returns an EnclaveConfig with default values.
func PrefundWallets ¶
func PrefundWallets(ctx context.Context, faucetWallet wallet.Wallet, faucetClient *obsclient.AuthObsClient, startingNonce uint64, wallets []wallet.Wallet, alloc *big.Int, timeout time.Duration)
PrefundWallets sends an amount `alloc` from the faucet wallet to each listed wallet. The transactions are sent with sequential nonces, starting with `startingNonce`.
Types ¶
type ERC20 ¶
type ERC20 string
ERC20 - the supported ERC20 tokens. A list of made-up tokens used for testing.
type ERC20Mapping ¶
type ERC20Mapping struct { Name ERC20 // L1Owner wallet.Wallet L1Address *gethcommon.Address Owner wallet.Wallet // for now the wrapped L2 version is owned by a wallet, but this will change L2Address *gethcommon.Address }
ERC20Mapping - maps an L1 Erc20 to an L2 Erc20 address