Documentation ¶
Index ¶
- Constants
- func AddInput(ctx context.Context, rpcUrl string, payload []byte) error
- func CheckAnvilAndInstall(ctx context.Context) (string, error)
- func GetInputAdded(ctx context.Context, rpcUrl string) ([]*contracts.InputBoxInputAdded, error)
- func InstallAnvil(ctx context.Context) (string, error)
- func IsAnvilInstalled() bool
- func ShowAddresses()
- type AnvilWorker
- type ContractInfo
Constants ¶
View Source
const ( AnvilDefaultAddress = "127.0.0.1" AnvilDefaultPort = 8545 )
Default port for the Ethereum node.
View Source
const ApplicationAddress = "0xab7528bb862fb57e8a2bcd567a2e929a0be56a5e"
sunodo v0.11.2
View Source
const ApplicationContractName = "CartesiDApp"
View Source
const GasLimit = 30_000_000
Gas limit when sending transactions.
View Source
const InputBoxAddress = "0x58Df21fE097d4bE5dCf61e01d9ea3f6B81c2E1dB"
Input box address in devnet. const InputBoxAddress = "0x59b22D57D4f067708AB0c00552767405926dc768"
View Source
const SenderAddress = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
Account that sends the transactions.
View Source
const SenderPrivateKey = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
Private key of the sender.
View Source
const TestMnemonic = "test test test test test test test test test test test junk"
Foundry test mnemonic.
Variables ¶
This section is empty.
Functions ¶
func AddInput ¶
AddInput sends an input to Ethereum using the devnet sender. This function should be used in the devnet environment.
func CheckAnvilAndInstall ¶ added in v1.1.2
func GetInputAdded ¶
GetInputAdded gets all input added events from the input box.
func IsAnvilInstalled ¶ added in v1.1.2
func IsAnvilInstalled() bool
func ShowAddresses ¶
func ShowAddresses()
Types ¶
type AnvilWorker ¶
Start the anvil process in the host machine.
func (AnvilWorker) Start ¶
func (w AnvilWorker) Start(ctx context.Context, ready chan<- struct{}) error
func (AnvilWorker) String ¶
func (w AnvilWorker) String() string
type ContractInfo ¶
type ContractInfo struct { Contracts map[string]struct { Address string `json:"address"` } `json:"contracts"` }
Define a struct to represent the structure of your JSON data
Directories ¶
Path | Synopsis |
---|---|
This program gets the devnet state from the devnet Docker image.
|
This program gets the devnet state from the devnet Docker image. |
Click to show internal directories.
Click to hide internal directories.