test

package
v0.0.0-...-63bf43c Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Address = "0x36615Cf349d7F6344891B1e7CA7C72883F5dc049"
View Source
const EthereumProvider = "http://localhost:8545"
View Source
const PrivateKey = "7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110"
View Source
const Receiver = "0xa61464658AfeAf65CccaaFD3a512b69A83B77618"
View Source
const ZkSyncEraProvider = "http://localhost:3050"

Variables

View Source
var TokenABI = TokenMetaData.ABI

TokenABI is the input ABI used to generate the binding from. Deprecated: Use TokenMetaData.ABI instead.

View Source
var TokenBin = TokenMetaData.Bin

TokenBin is the compiled bytecode used for deploying new contracts. Deprecated: Use TokenMetaData.Bin instead.

View Source
var TokenMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
	Bin: "0x60806040523480156200001157600080fd5b5060405162001a8038038062001a80833981810160405281019062000037919062000254565b828281600390816200004a919062000539565b5080600490816200005c919062000539565b50505080600560006101000a81548160ff021916908360ff16021790555050505062000620565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000ec82620000a1565b810181811067ffffffffffffffff821117156200010e576200010d620000b2565b5b80604052505050565b60006200012362000083565b9050620001318282620000e1565b919050565b600067ffffffffffffffff821115620001545762000153620000b2565b5b6200015f82620000a1565b9050602081019050919050565b60005b838110156200018c5780820151818401526020810190506200016f565b60008484015250505050565b6000620001af620001a98462000136565b62000117565b905082815260208101848484011115620001ce57620001cd6200009c565b5b620001db8482856200016c565b509392505050565b600082601f830112620001fb57620001fa62000097565b5b81516200020d84826020860162000198565b91505092915050565b600060ff82169050919050565b6200022e8162000216565b81146200023a57600080fd5b50565b6000815190506200024e8162000223565b92915050565b60008060006060848603121562000270576200026f6200008d565b5b600084015167ffffffffffffffff81111562000291576200029062000092565b5b6200029f86828701620001e3565b935050602084015167ffffffffffffffff811115620002c357620002c262000092565b5b620002d186828701620001e3565b9250506040620002e4868287016200023d565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200034157607f821691505b602082108103620003575762000356620002f9565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620003c17fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000382565b620003cd868362000382565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006200041a620004146200040e84620003e5565b620003ef565b620003e5565b9050919050565b6000819050919050565b6200043683620003f9565b6200044e620004458262000421565b8484546200038f565b825550505050565b600090565b6200046562000456565b620004728184846200042b565b505050565b5b818110156200049a576200048e6000826200045b565b60018101905062000478565b5050565b601f821115620004e957620004b3816200035d565b620004be8462000372565b81016020851015620004ce578190505b620004e6620004dd8562000372565b83018262000477565b50505b505050565b600082821c905092915050565b60006200050e60001984600802620004ee565b1980831691505092915050565b6000620005298383620004fb565b9150826002028217905092915050565b6200054482620002ee565b67ffffffffffffffff81111562000560576200055f620000b2565b5b6200056c825462000328565b620005798282856200049e565b600060209050601f831160018114620005b157600084156200059c578287015190505b620005a885826200051b565b86555062000618565b601f198416620005c1866200035d565b60005b82811015620005eb57848901518255600182019150602085019450602081019050620005c4565b868310156200060b578489015162000607601f891682620004fb565b8355505b6001600288020188555050505b505050505050565b61145080620006306000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146101a357806370a08231146101d357806395d89b4114610203578063a457c2d714610221578063a9059cbb14610251578063dd62ed3e14610281576100b4565b806306fdde03146100b9578063095ea7b3146100d757806318160ddd1461010757806323b872dd14610125578063313ce567146101555780633950935114610173575b600080fd5b6100c16102b1565b6040516100ce9190610cc1565b60405180910390f35b6100f160048036038101906100ec9190610d7c565b610343565b6040516100fe9190610dd7565b60405180910390f35b61010f610366565b60405161011c9190610e01565b60405180910390f35b61013f600480360381019061013a9190610e1c565b610370565b60405161014c9190610dd7565b60405180910390f35b61015d61039f565b60405161016a9190610e8b565b60405180910390f35b61018d60048036038101906101889190610d7c565b6103b6565b60405161019a9190610dd7565b60405180910390f35b6101bd60048036038101906101b89190610d7c565b6103ed565b6040516101ca9190610dd7565b60405180910390f35b6101ed60048036038101906101e89190610ea6565b610403565b6040516101fa9190610e01565b60405180910390f35b61020b61044b565b6040516102189190610cc1565b60405180910390f35b61023b60048036038101906102369190610d7c565b6104dd565b6040516102489190610dd7565b60405180910390f35b61026b60048036038101906102669190610d7c565b610554565b6040516102789190610dd7565b60405180910390f35b61029b60048036038101906102969190610ed3565b610577565b6040516102a89190610e01565b60405180910390f35b6060600380546102c090610f42565b80601f01602080910402602001604051908101604052809291908181526020018280546102ec90610f42565b80156103395780601f1061030e57610100808354040283529160200191610339565b820191906000526020600020905b81548152906001019060200180831161031c57829003601f168201915b5050505050905090565b60008061034e6105fe565b905061035b818585610606565b600191505092915050565b6000600254905090565b60008061037b6105fe565b90506103888582856107cf565b61039385858561085b565b60019150509392505050565b6000600560009054906101000a900460ff16905090565b6000806103c16105fe565b90506103e28185856103d38589610577565b6103dd9190610fa2565b610606565b600191505092915050565b60006103f98383610ad1565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461045a90610f42565b80601f016020809104026020016040519081016040528092919081815260200182805461048690610f42565b80156104d35780601f106104a8576101008083540402835291602001916104d3565b820191906000526020600020905b8154815290600101906020018083116104b657829003601f168201915b5050505050905090565b6000806104e86105fe565b905060006104f68286610577565b90508381101561053b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053290611048565b60405180910390fd5b6105488286868403610606565b60019250505092915050565b60008061055f6105fe565b905061056c81858561085b565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066c906110da565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036106e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106db9061116c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107c29190610e01565b60405180910390a3505050565b60006107db8484610577565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146108555781811015610847576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083e906111d8565b60405180910390fd5b6108548484848403610606565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c19061126a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610939576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610930906112fc565b60405180910390fd5b610944838383610c27565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156109ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c19061138e565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ab89190610e01565b60405180910390a3610acb848484610c2c565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b37906113fa565b60405180910390fd5b610b4c60008383610c27565b8060026000828254610b5e9190610fa2565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610c0f9190610e01565b60405180910390a3610c2360008383610c2c565b5050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610c6b578082015181840152602081019050610c50565b60008484015250505050565b6000601f19601f8301169050919050565b6000610c9382610c31565b610c9d8185610c3c565b9350610cad818560208601610c4d565b610cb681610c77565b840191505092915050565b60006020820190508181036000830152610cdb8184610c88565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610d1382610ce8565b9050919050565b610d2381610d08565b8114610d2e57600080fd5b50565b600081359050610d4081610d1a565b92915050565b6000819050919050565b610d5981610d46565b8114610d6457600080fd5b50565b600081359050610d7681610d50565b92915050565b60008060408385031215610d9357610d92610ce3565b5b6000610da185828601610d31565b9250506020610db285828601610d67565b9150509250929050565b60008115159050919050565b610dd181610dbc565b82525050565b6000602082019050610dec6000830184610dc8565b92915050565b610dfb81610d46565b82525050565b6000602082019050610e166000830184610df2565b92915050565b600080600060608486031215610e3557610e34610ce3565b5b6000610e4386828701610d31565b9350506020610e5486828701610d31565b9250506040610e6586828701610d67565b9150509250925092565b600060ff82169050919050565b610e8581610e6f565b82525050565b6000602082019050610ea06000830184610e7c565b92915050565b600060208284031215610ebc57610ebb610ce3565b5b6000610eca84828501610d31565b91505092915050565b60008060408385031215610eea57610ee9610ce3565b5b6000610ef885828601610d31565b9250506020610f0985828601610d31565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610f5a57607f821691505b602082108103610f6d57610f6c610f13565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610fad82610d46565b9150610fb883610d46565b9250828201905080821115610fd057610fcf610f73565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000611032602583610c3c565b915061103d82610fd6565b604082019050919050565b6000602082019050818103600083015261106181611025565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006110c4602483610c3c565b91506110cf82611068565b604082019050919050565b600060208201905081810360008301526110f3816110b7565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611156602283610c3c565b9150611161826110fa565b604082019050919050565b6000602082019050818103600083015261118581611149565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b60006111c2601d83610c3c565b91506111cd8261118c565b602082019050919050565b600060208201905081810360008301526111f1816111b5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611254602583610c3c565b915061125f826111f8565b604082019050919050565b6000602082019050818103600083015261128381611247565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006112e6602383610c3c565b91506112f18261128a565b604082019050919050565b60006020820190508181036000830152611315816112d9565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000611378602683610c3c565b91506113838261131c565b604082019050919050565b600060208201905081810360008301526113a78161136b565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b60006113e4601f83610c3c565b91506113ef826113ae565b602082019050919050565b60006020820190508181036000830152611413816113d7565b905091905056fea2646970667358221220000337f45cfac5d1f414a2e9ac8d9051c93d7cab29f64c5a5d1f8167426908db64736f6c63430008130033",
}

TokenMetaData contains all meta data concerning the Token contract.

Functions

This section is empty.

Types

type Token

type Token struct {
	TokenCaller     // Read-only binding to the contract
	TokenTransactor // Write-only binding to the contract
	TokenFilterer   // Log filterer for contract events
}

Token is an auto generated Go binding around an Ethereum contract.

func DeployToken

func DeployToken(auth *bind.TransactOpts, backend bind.ContractBackend, name_ string, symbol_ string, decimals_ uint8) (common.Address, *types.Transaction, *Token, error)

DeployToken deploys a new Ethereum contract, binding an instance of Token to it.

func NewToken

func NewToken(address common.Address, backend bind.ContractBackend) (*Token, error)

NewToken creates a new instance of Token, bound to a specific deployed contract.

type TokenApproval

type TokenApproval struct {
	Owner   common.Address
	Spender common.Address
	Value   *big.Int
	Raw     types.Log // Blockchain specific contextual infos
}

TokenApproval represents a Approval event raised by the Token contract.

type TokenApprovalIterator

type TokenApprovalIterator struct {
	Event *TokenApproval // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

TokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Token contract.

func (*TokenApprovalIterator) Close

func (it *TokenApprovalIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*TokenApprovalIterator) Error

func (it *TokenApprovalIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*TokenApprovalIterator) Next

func (it *TokenApprovalIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type TokenCaller

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

TokenCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewTokenCaller

func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*TokenCaller, error)

NewTokenCaller creates a new read-only instance of Token, bound to a specific deployed contract.

func (*TokenCaller) Allowance

func (_Token *TokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*TokenCaller) BalanceOf

func (_Token *TokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address account) view returns(uint256)

func (*TokenCaller) Decimals

func (_Token *TokenCaller) Decimals(opts *bind.CallOpts) (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() view returns(uint8)

func (*TokenCaller) Name

func (_Token *TokenCaller) Name(opts *bind.CallOpts) (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() view returns(string)

func (*TokenCaller) Symbol

func (_Token *TokenCaller) Symbol(opts *bind.CallOpts) (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() view returns(string)

func (*TokenCaller) TotalSupply

func (_Token *TokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

type TokenCallerRaw

type TokenCallerRaw struct {
	Contract *TokenCaller // Generic read-only contract binding to access the raw methods on
}

TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*TokenCallerRaw) Call

func (_Token *TokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type TokenCallerSession

type TokenCallerSession struct {
	Contract *TokenCaller  // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*TokenCallerSession) Allowance

func (_Token *TokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*TokenCallerSession) BalanceOf

func (_Token *TokenCallerSession) BalanceOf(account common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address account) view returns(uint256)

func (*TokenCallerSession) Decimals

func (_Token *TokenCallerSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() view returns(uint8)

func (*TokenCallerSession) Name

func (_Token *TokenCallerSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() view returns(string)

func (*TokenCallerSession) Symbol

func (_Token *TokenCallerSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() view returns(string)

func (*TokenCallerSession) TotalSupply

func (_Token *TokenCallerSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

type TokenFilterer

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

TokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewTokenFilterer

func NewTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenFilterer, error)

NewTokenFilterer creates a new log filterer instance of Token, bound to a specific deployed contract.

func (*TokenFilterer) FilterApproval

func (_Token *TokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*TokenApprovalIterator, error)

FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*TokenFilterer) FilterTransfer

func (_Token *TokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*TokenTransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

func (*TokenFilterer) ParseApproval

func (_Token *TokenFilterer) ParseApproval(log types.Log) (*TokenApproval, error)

ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*TokenFilterer) ParseTransfer

func (_Token *TokenFilterer) ParseTransfer(log types.Log) (*TokenTransfer, error)

ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

func (*TokenFilterer) WatchApproval

func (_Token *TokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error)

WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*TokenFilterer) WatchTransfer

func (_Token *TokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

type TokenRaw

type TokenRaw struct {
	Contract *Token // Generic contract binding to access the raw methods on
}

TokenRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*TokenRaw) Call

func (_Token *TokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*TokenRaw) Transact

func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*TokenRaw) Transfer

func (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type TokenSession

type TokenSession struct {
	Contract     *Token            // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

TokenSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*TokenSession) Allowance

func (_Token *TokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*TokenSession) Approve

func (_Token *TokenSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 amount) returns(bool)

func (*TokenSession) BalanceOf

func (_Token *TokenSession) BalanceOf(account common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address account) view returns(uint256)

func (*TokenSession) Decimals

func (_Token *TokenSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() view returns(uint8)

func (*TokenSession) DecreaseAllowance

func (_Token *TokenSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error)

DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.

Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)

func (*TokenSession) IncreaseAllowance

func (_Token *TokenSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error)

IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.

Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)

func (*TokenSession) Mint

func (_Token *TokenSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0x40c10f19.

Solidity: function mint(address _to, uint256 _amount) returns(bool)

func (*TokenSession) Name

func (_Token *TokenSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() view returns(string)

func (*TokenSession) Symbol

func (_Token *TokenSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() view returns(string)

func (*TokenSession) TotalSupply

func (_Token *TokenSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

func (*TokenSession) Transfer

func (_Token *TokenSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address to, uint256 amount) returns(bool)

func (*TokenSession) TransferFrom

func (_Token *TokenSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool)

type TokenTransactor

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

TokenTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewTokenTransactor

func NewTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenTransactor, error)

NewTokenTransactor creates a new write-only instance of Token, bound to a specific deployed contract.

func (*TokenTransactor) Approve

func (_Token *TokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 amount) returns(bool)

func (*TokenTransactor) DecreaseAllowance

func (_Token *TokenTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error)

DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.

Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)

func (*TokenTransactor) IncreaseAllowance

func (_Token *TokenTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error)

IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.

Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)

func (*TokenTransactor) Mint

func (_Token *TokenTransactor) Mint(opts *bind.TransactOpts, _to common.Address, _amount *big.Int) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0x40c10f19.

Solidity: function mint(address _to, uint256 _amount) returns(bool)

func (*TokenTransactor) Transfer

func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address to, uint256 amount) returns(bool)

func (*TokenTransactor) TransferFrom

func (_Token *TokenTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool)

type TokenTransactorRaw

type TokenTransactorRaw struct {
	Contract *TokenTransactor // Generic write-only contract binding to access the raw methods on
}

TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*TokenTransactorRaw) Transact

func (_Token *TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*TokenTransactorRaw) Transfer

func (_Token *TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type TokenTransactorSession

type TokenTransactorSession struct {
	Contract     *TokenTransactor  // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*TokenTransactorSession) Approve

func (_Token *TokenTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 amount) returns(bool)

func (*TokenTransactorSession) DecreaseAllowance

func (_Token *TokenTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error)

DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.

Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)

func (*TokenTransactorSession) IncreaseAllowance

func (_Token *TokenTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error)

IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.

Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)

func (*TokenTransactorSession) Mint

func (_Token *TokenTransactorSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0x40c10f19.

Solidity: function mint(address _to, uint256 _amount) returns(bool)

func (*TokenTransactorSession) Transfer

func (_Token *TokenTransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address to, uint256 amount) returns(bool)

func (*TokenTransactorSession) TransferFrom

func (_Token *TokenTransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool)

type TokenTransfer

type TokenTransfer struct {
	From  common.Address
	To    common.Address
	Value *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

TokenTransfer represents a Transfer event raised by the Token contract.

type TokenTransferIterator

type TokenTransferIterator struct {
	Event *TokenTransfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

TokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Token contract.

func (*TokenTransferIterator) Close

func (it *TokenTransferIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*TokenTransferIterator) Error

func (it *TokenTransferIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*TokenTransferIterator) Next

func (it *TokenTransferIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

Jump to

Keyboard shortcuts

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