devnet

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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

func AddInput(ctx context.Context, rpcUrl string, payload []byte) error

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 CheckAnvilAndInstall(ctx context.Context) (string, error)

func GetInputAdded

func GetInputAdded(ctx context.Context, rpcUrl string) ([]*contracts.InputBoxInputAdded, error)

GetInputAdded gets all input added events from the input box.

func InstallAnvil added in v1.1.2

func InstallAnvil(ctx context.Context) (string, error)

func IsAnvilInstalled added in v1.1.2

func IsAnvilInstalled() bool

func ShowAddresses

func ShowAddresses()

Types

type AnvilWorker

type AnvilWorker struct {
	Address  string
	Port     int
	Verbose  bool
	AnvilCmd string
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL