2022-10-11 12:34:32 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"github.com/ledgerwatch/erigon/cmd/devnet/models"
|
|
|
|
)
|
|
|
|
|
|
|
|
// ExecuteAllMethods runs all the simulation tests for erigon devnet
|
|
|
|
func ExecuteAllMethods() {
|
|
|
|
// test connection to JSON RPC
|
|
|
|
fmt.Println("Mocking get requests to JSON RPC...")
|
|
|
|
pingErigonRpc()
|
|
|
|
fmt.Println()
|
|
|
|
|
|
|
|
// get balance of the receiver's account
|
2022-10-31 10:46:49 +00:00
|
|
|
callGetBalance(addr, models.Latest, 0)
|
2022-10-11 12:34:32 +00:00
|
|
|
fmt.Println()
|
|
|
|
|
2022-10-31 10:46:49 +00:00
|
|
|
// confirm that the txpool is empty
|
2022-10-11 12:34:32 +00:00
|
|
|
fmt.Println("Confirming the tx pool is empty...")
|
|
|
|
callTxPoolContent()
|
2022-10-31 10:46:49 +00:00
|
|
|
|
|
|
|
// send a token from the dev address to the recipient address
|
|
|
|
callSendTx(sendValue, recipientAddress, models.DevAddress)
|
|
|
|
fmt.Println()
|
|
|
|
|
|
|
|
// confirm that the txpool has this transaction in the queue
|
|
|
|
fmt.Println("Confirming the tx pool has the latest transaction...")
|
|
|
|
callTxPoolContent()
|
2022-10-11 12:34:32 +00:00
|
|
|
}
|