Documentation ¶
Index ¶
- Constants
- 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() *enclaveconfig.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
- func TestnetGenesisJSON() string
- type ERC20
- type ERC20Mapping
Constants ¶
View Source
const ( HOC ERC20 = "HOC" POC ERC20 = "POC" HOCAddr = "f3a8bd422097bFdd9B3519Eaeb533393a1c561aC" TestnetPrefundedPK = "8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b" // The genesis main account private key. )
Variables ¶
View Source
var BridgeAddress = gethcommon.BytesToAddress(gethcommon.Hex2Bytes(bridgeAddr))
BridgeAddress - address of the virtual bridge
View Source
var HOCContract = gethcommon.BytesToAddress(gethcommon.Hex2Bytes(HOCAddr))
HOCContract - address of the deployed "hocus" erc20 on the L2
View Source
var HOCOwner, _ = crypto.HexToECDSA(hocOwnerKeyHex)
View Source
var POCContract = gethcommon.BytesToAddress(gethcommon.Hex2Bytes(pocAddr))
POCContract - address of the deployed "pocus" erc20 on the L2
View Source
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() *enclaveconfig.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`.
func TestnetGenesisJSON ¶ added in v1.0.0
func TestnetGenesisJSON() string
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
Click to show internal directories.
Click to hide internal directories.