gnosis

package
v0.0.0-...-2597ab7 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package gnosis provides helper functionality to work with gnosis multisig wallets and apps therein.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyAddress

type EmptyAddress common.Address

EmptyAddress is a wrapper around `common.Address` that marshals as empty string if the address is the ZeroAddress

func (EmptyAddress) String

func (a EmptyAddress) String() string

type GnosisCSVTransfer

type GnosisCSVTransfer struct {
	TokenType    TokenType       `csv:"token_type"`
	TokenAddress EmptyAddress    `csv:"token_address"`
	Receiver     common.Address  `csv:"receiver"`
	Amount       decimal.Decimal `csv:"amount"`
	ID           uint64          `csv:"id"`
}

GnosisCSVTransfer encodes a transfer with Gnosis' CSV app (https://github.com/bh2smith/safe-airdrop). Slices of this struct are intended to be converted into CSV format using `gocarina/gocsv` to be consumed by Gnosis' CSV app.

func NewERC1155Transfer

func NewERC1155Transfer(collection common.Address, id uint64, amount uint32, receiver common.Address) *GnosisCSVTransfer

NewERC1155Transfer creates a new ERC1155 transfer for Gnosis' CSV app.

func NewERC20Transfer

func NewERC20Transfer(coin common.Address, amount decimal.Decimal, receiver common.Address) *GnosisCSVTransfer

NewERC20Transfer creates a new ERC20 transfer for Gnosis' CSV app.

func NewERC721Transfer

func NewERC721Transfer(collection common.Address, id uint64, receiver common.Address) *GnosisCSVTransfer

NewERC721Transfer creates a new ERC721 transfer for Gnosis' CSV app.

func NewETHTransfer

func NewETHTransfer(amount decimal.Decimal, receiver common.Address) *GnosisCSVTransfer

NewETHTransfer creates a new ETH transfer for Gnosis' CSV app.

type TokenType

type TokenType string

TokenType denotes the different types of tokens that can be transferred using Gnosis' CSV app.

const (
	ERC721  TokenType = "nft"
	ERC1155 TokenType = "nft"
	ERC20   TokenType = "erc20"
	ETH     TokenType = "native"
)

The different token types that can be transferred using Gnosis' CSV app.

Jump to

Keyboard shortcuts

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