mai

package module
v0.0.0-...-a05b099 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ABIs = map[string]string{
	"mai": mai.MaiABI,
}
View Source
var ContractAddresses = map[string]map[string]string{
	"polygon": {
		"mai": "0xa3Fa99A148fA48D14Ed51d610c367C61876997F1",
	},
}
View Source
var Parsers = map[string]ISmartContract{
	"mai": &mai.SmartContract{},
}

Functions

func GetAddresses

func GetAddresses(addresses map[string]string) []common.Address

func GetContracts

func GetContracts(addresses map[string]string) map[string]*Contract

Types

type Config

type Config struct {
	Blockchain string
	FromBlock  uint64
	NumBlocks  uint64
}

type Connector

type Connector struct {
	*ethereum.Connector
	*Config
	// contains filtered or unexported fields
}

func New

func New(conf *Config) *Connector

func (*Connector) Start

func (c *Connector) Start()

type Contract

type Contract struct {
	ABI           *abi.ABI
	Name          string
	MessageParser ISmartContract
}

type ISmartContract

type ISmartContract interface {
	Message(eventName string, contractAbi *abi.ABI, vLog types.Log, timestamp *timestamppb.Timestamp) protoreflect.ProtoMessage
}

Directories

Path Synopsis
cmd
mai
smart-contracts
mai

Jump to

Keyboard shortcuts

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