Help us shape the future of Go! Take the 2026 Go Developer Survey

devnet

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT, Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PayerPrivateKey    = "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
	FeePayerPrivateKey = "0xdd83cd66cd98801a07e0b7c1a5b02364b369e696da7c0ab444acffea5cca86fc"
	Currency           = "0x20c0000000000000000000000000000000000000"
	Recipient          = "0x70997970c51812dc3a010c7d01b50e0d17dc79c8"
	Realm              = "api.example.com"
)

Variables

This section is empty.

Functions

func FundAddress

func FundAddress(ctx context.Context, rpc tempo.RPCClient, address common.Address) error

FundAddress funds address from the devnet faucet and waits for the funding transactions' receipts.

func PaymentPolicy added in v0.4.0

func PaymentPolicy(chainID int64, recipient string) func(context.Context, tempo.ChargeRequest) error

PaymentPolicy permits at most one token per payment to the example payee on the configured chain. Applications should also enforce their own total budget.

func Prepare added in v0.5.1

func Prepare(ctx context.Context, privateKeys ...string) (string, int64, error)

Prepare waits for the node at RPCURL and funds the accounts of the given private keys, returning the RPC URL and chain ID for an example run.

func RPCURL

func RPCURL() string

RPCURL returns TEMPO_RPC_URL, or the local devnet URL when it is unset.

func WaitForRPC

func WaitForRPC(ctx context.Context, rpc tempo.RPCClient) (int64, error)

WaitForRPC polls the node until it reports a chain ID, ctx ends, or the readiness timeout passes, and returns the chain ID.

Types

This section is empty.

Jump to

Keyboard shortcuts

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