mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-28 01:05:19 +00:00
735d44ba32
* check receipt status for failed txs from evm * make EvmSigner's Auth public * setup evm state initialization for e2e * add a dummy Greeter contract, deployed on start * move WaitForEvmTxReceipt to from account to util * add tests for interacting with the contract * add ContractAddrs map to Chain
19 lines
564 B
Go
19 lines
564 B
Go
package testutil
|
|
|
|
import "github.com/kava-labs/kava/tests/e2e/contracts/greeter"
|
|
|
|
// InitKavaEvmData is run after the chain is running, but before the tests are run.
|
|
// It is used to initialize some EVM state, such as deploying contracts.
|
|
func (suite *E2eTestSuite) InitKavaEvmData() {
|
|
whale := suite.Kava.GetAccount(FundedAccountName)
|
|
|
|
// deploy an example contract
|
|
greeterAddr, _, _, err := greeter.DeployGreeter(
|
|
whale.evmSigner.Auth,
|
|
whale.evmSigner.EvmClient,
|
|
"what's up!",
|
|
)
|
|
suite.NoError(err)
|
|
suite.Kava.ContractAddrs["greeter"] = greeterAddr
|
|
}
|