templates

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EthereumChainsByID = map[string]*EthereumChain{
	"Mainnet": {
		DisplayName:            "Ethereum Mainnet",
		ExplorerLink:           "https://etherscan.io",
		ApiEndpoint:            "https://api.etherscan.io",
		DefaultContractAddress: "bc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
		DefaultContractName:    "Bored Ape Yacht Club",
		FirehoseEndpoint:       "mainnet.eth.streamingfast.io:443",
	},
	"BNB": {
		DisplayName:            "BNB",
		ExplorerLink:           "https://bscscan.com",
		ApiEndpoint:            "https://api.bscscan.com",
		DefaultContractAddress: "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
		DefaultContractName:    "CAKE Token",
		FirehoseEndpoint:       "bnb.streamingfast.io:443",
	},
	"Polygon": {
		DisplayName:            "Polygon",
		ExplorerLink:           "https://polygonscan.com",
		ApiEndpoint:            "https://api.polygonscan.com",
		DefaultContractAddress: "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
		DefaultContractName:    "WETH Token",
		FirehoseEndpoint:       "polygon.streamingfast.io:443",
	},
	"Goerli": {
		DisplayName:            "Goerli Testnet",
		ExplorerLink:           "https://goerli.etherscan.io",
		ApiEndpoint:            "https://api-goerli.etherscan.io",
		DefaultContractAddress: "0x4f7a67464b5976d7547c860109e4432d50afb38e",
		DefaultContractName:    "GETH Token",
		FirehoseEndpoint:       "goerli.eth.streamingfast.io:443",
	},
	"Mumbai": {
		DisplayName:            "Mumbai Testnet",
		ExplorerLink:           "https://mumbai.polygonscan.com",
		ApiEndpoint:            "https://api-mumbai.polygonscan.com",
		DefaultContractAddress: "0xFCe7187B24FCDc9feFfE428Ec9977240C6F7006D",
		DefaultContractName:    "USDT Token",
		FirehoseEndpoint:       "mumbai.streamingfast.io:443",
	},
}
View Source
var ProjectGeneratorFuncs = template.FuncMap{
	"add": func(left int, right int) int {
		return left + right
	},
}

Functions

This section is empty.

Types

type EthereumChain

type EthereumChain struct {
	ID                     string
	DisplayName            string
	ExplorerLink           string
	ApiEndpoint            string
	DefaultContractAddress string
	DefaultContractName    string
	FirehoseEndpoint       string
}

type EthereumProject

type EthereumProject struct {
	// contains filtered or unexported fields
}

func NewEthereumProject

func NewEthereumProject(name string, moduleName string, chain *EthereumChain, address eth.Address, abi *eth.ABI, abiContent string, creationBlockNum uint64) (*EthereumProject, error)

func (*EthereumProject) Render

func (p *EthereumProject) Render() (map[string][]byte, error)

type Project

type Project interface {
	Render() (map[string][]byte, error)
}

type ProjectFunc

type ProjectFunc func() (map[string][]byte, error)

func (ProjectFunc) Render

func (f ProjectFunc) Render() (map[string][]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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