faucet

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NativeToken = "eth"
	// DeprecatedNativeToken is left in temporarily for tooling that is getting native funds using `/ten` URL
	DeprecatedNativeToken = "ten" // todo (@matt) remove this once we have fixed the /ten usages
	WrappedOBX            = "wobx"
	WrappedEth            = "weth"
	WrappedUSDC           = "usdc"
)

Variables

This section is empty.

Functions

func ValidateToken

func ValidateToken(tokenString string, secret []byte) (*jwt.Token, error)

Types

type Config

type Config struct {
	Host              string
	HTTPPort          int
	PK                string
	JWTSecret         string
	ChainID           *big.Int
	ServerPort        int
	DefaultFundAmount *big.Int // how much token to fund by default (in wei)
}

type Faucet

type Faucet struct {
	Logger log.Logger
	// contains filtered or unexported fields
}

func NewFaucet

func NewFaucet(rpcURL string, chainID int64, pkString string) (*Faucet, error)

func (*Faucet) Balance

func (f *Faucet) Balance(ctx context.Context) (*big.Int, error)

func (*Faucet) Fund

func (f *Faucet) Fund(address *common.Address, token string, amount *big.Int) (string, error)

Jump to

Keyboard shortcuts

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