mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
310 lines
15 KiB
Go
310 lines
15 KiB
Go
// Code generated - DO NOT EDIT.
|
|
// This file is a generated binding and any manual changes will be lost.
|
|
|
|
package contracts
|
|
|
|
import (
|
|
"math/big"
|
|
"strings"
|
|
|
|
ethereum "github.com/ledgerwatch/turbo-geth"
|
|
"github.com/ledgerwatch/turbo-geth/accounts/abi"
|
|
"github.com/ledgerwatch/turbo-geth/accounts/abi/bind"
|
|
"github.com/ledgerwatch/turbo-geth/common"
|
|
"github.com/ledgerwatch/turbo-geth/core/types"
|
|
"github.com/ledgerwatch/turbo-geth/event"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var (
|
|
_ = big.NewInt
|
|
_ = strings.NewReader
|
|
_ = ethereum.NotFound
|
|
_ = abi.U256
|
|
_ = bind.Bind
|
|
_ = common.Big1
|
|
_ = types.BloomLookup
|
|
_ = event.NewSubscription
|
|
)
|
|
|
|
// TokenABI is the input ABI used to generate the binding from.
|
|
const TokenABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"minter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_minter\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]"
|
|
|
|
// TokenBin is the compiled bytecode used for deploying new contracts.
|
|
const TokenBin = `608060405234801561001057600080fd5b506040516020806103168339810180604052602081101561003057600080fd5b505160028054600160a060020a031916600160a060020a039092169190911790556102b6806100606000396000f3fe60806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166307546172811461007157806318160ddd146100a257806340c10f19146100c957806370a0823114610116578063a9059cbb14610149575b600080fd5b34801561007d57600080fd5b50610086610182565b60408051600160a060020a039092168252519081900360200190f35b3480156100ae57600080fd5b506100b7610191565b60408051918252519081900360200190f35b3480156100d557600080fd5b50610102600480360360408110156100ec57600080fd5b50600160a060020a038135169060200135610197565b604080519115158252519081900360200190f35b34801561012257600080fd5b506100b76004803603602081101561013957600080fd5b5035600160a060020a0316610207565b34801561015557600080fd5b506101026004803603604081101561016c57600080fd5b50600160a060020a038135169060200135610219565b600254600160a060020a031681565b60005481565b600254600090600160a060020a031633146101b157600080fd5b600160a060020a0383166000908152600160205260409020548281018111156101d957600080fd5b600160a060020a03841660009081526001602081905260408220928501909255805484019055905092915050565b60016020526000908152604090205481565b3360009081526001602052604080822054600160a060020a0385168352908220548382101561024757600080fd5b83810181111561025657600080fd5b33600090815260016020819052604080832094879003909455600160a060020a03969096168152919091209201909155509056fea165627a7a72305820fd6f993c884a8ef66c151644b52b0f09049c0d42583a05b8033ddcf285267a7a0029`
|
|
|
|
// DeployToken deploys a new Ethereum contract, binding an instance of Token to it.
|
|
func DeployToken(auth *bind.TransactOpts, backend bind.ContractBackend, _minter common.Address) (common.Address, *types.Transaction, *Token, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(TokenABI))
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(TokenBin), backend, _minter)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &Token{TokenCaller: TokenCaller{contract: contract}, TokenTransactor: TokenTransactor{contract: contract}, TokenFilterer: TokenFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// Token is an auto generated Go binding around an Ethereum contract.
|
|
type Token struct {
|
|
TokenCaller // Read-only binding to the contract
|
|
TokenTransactor // Write-only binding to the contract
|
|
TokenFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// TokenCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type TokenCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// TokenTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type TokenTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// TokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type TokenFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// TokenSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
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
|
|
}
|
|
|
|
// TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type TokenCallerSession struct {
|
|
Contract *TokenCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
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
|
|
}
|
|
|
|
// TokenRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type TokenRaw struct {
|
|
Contract *Token // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type TokenCallerRaw struct {
|
|
Contract *TokenCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type TokenTransactorRaw struct {
|
|
Contract *TokenTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewToken creates a new instance of Token, bound to a specific deployed contract.
|
|
func NewToken(address common.Address, backend bind.ContractBackend) (*Token, error) {
|
|
contract, err := bindToken(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &Token{TokenCaller: TokenCaller{contract: contract}, TokenTransactor: TokenTransactor{contract: contract}, TokenFilterer: TokenFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewTokenCaller creates a new read-only instance of Token, bound to a specific deployed contract.
|
|
func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*TokenCaller, error) {
|
|
contract, err := bindToken(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TokenCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewTokenTransactor creates a new write-only instance of Token, bound to a specific deployed contract.
|
|
func NewTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenTransactor, error) {
|
|
contract, err := bindToken(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TokenTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewTokenFilterer creates a new log filterer instance of Token, bound to a specific deployed contract.
|
|
func NewTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenFilterer, error) {
|
|
contract, err := bindToken(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TokenFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindToken binds a generic wrapper to an already deployed contract.
|
|
func bindToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := abi.JSON(strings.NewReader(TokenABI))
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
|
|
}
|
|
|
|
// 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 (_Token *TokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
|
|
return _Token.Contract.TokenCaller.contract.Call(opts, result, method, params...)
|
|
}
|
|
|
|
// Transfer initiates a plain transaction to move funds to the contract, calling
|
|
// its default method if one is available.
|
|
func (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Token.Contract.TokenTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Token.Contract.TokenTransactor.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// 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 (_Token *TokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
|
|
return _Token.Contract.contract.Call(opts, result, method, params...)
|
|
}
|
|
|
|
// Transfer initiates a plain transaction to move funds to the contract, calling
|
|
// its default method if one is available.
|
|
func (_Token *TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Token.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Token *TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Token.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address ) constant returns(uint256)
|
|
func (_Token *TokenCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
|
|
var (
|
|
ret0 = new(*big.Int)
|
|
)
|
|
out := ret0
|
|
err := _Token.contract.Call(opts, out, "balanceOf", arg0)
|
|
return *ret0, err
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address ) constant returns(uint256)
|
|
func (_Token *TokenSession) BalanceOf(arg0 common.Address) (*big.Int, error) {
|
|
return _Token.Contract.BalanceOf(&_Token.CallOpts, arg0)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address ) constant returns(uint256)
|
|
func (_Token *TokenCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) {
|
|
return _Token.Contract.BalanceOf(&_Token.CallOpts, arg0)
|
|
}
|
|
|
|
// Minter is a free data retrieval call binding the contract method 0x07546172.
|
|
//
|
|
// Solidity: function minter() constant returns(address)
|
|
func (_Token *TokenCaller) Minter(opts *bind.CallOpts) (common.Address, error) {
|
|
var (
|
|
ret0 = new(common.Address)
|
|
)
|
|
out := ret0
|
|
err := _Token.contract.Call(opts, out, "minter")
|
|
return *ret0, err
|
|
}
|
|
|
|
// Minter is a free data retrieval call binding the contract method 0x07546172.
|
|
//
|
|
// Solidity: function minter() constant returns(address)
|
|
func (_Token *TokenSession) Minter() (common.Address, error) {
|
|
return _Token.Contract.Minter(&_Token.CallOpts)
|
|
}
|
|
|
|
// Minter is a free data retrieval call binding the contract method 0x07546172.
|
|
//
|
|
// Solidity: function minter() constant returns(address)
|
|
func (_Token *TokenCallerSession) Minter() (common.Address, error) {
|
|
return _Token.Contract.Minter(&_Token.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() constant returns(uint256)
|
|
func (_Token *TokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
|
var (
|
|
ret0 = new(*big.Int)
|
|
)
|
|
out := ret0
|
|
err := _Token.contract.Call(opts, out, "totalSupply")
|
|
return *ret0, err
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() constant returns(uint256)
|
|
func (_Token *TokenSession) TotalSupply() (*big.Int, error) {
|
|
return _Token.Contract.TotalSupply(&_Token.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() constant returns(uint256)
|
|
func (_Token *TokenCallerSession) TotalSupply() (*big.Int, error) {
|
|
return _Token.Contract.TotalSupply(&_Token.CallOpts)
|
|
}
|
|
|
|
// Mint is a paid mutator transaction binding the contract method 0x40c10f19.
|
|
//
|
|
// Solidity: function mint(address _to, uint256 _value) returns(bool)
|
|
func (_Token *TokenTransactor) Mint(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _Token.contract.Transact(opts, "mint", _to, _value)
|
|
}
|
|
|
|
// Mint is a paid mutator transaction binding the contract method 0x40c10f19.
|
|
//
|
|
// Solidity: function mint(address _to, uint256 _value) returns(bool)
|
|
func (_Token *TokenSession) Mint(_to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _Token.Contract.Mint(&_Token.TransactOpts, _to, _value)
|
|
}
|
|
|
|
// Mint is a paid mutator transaction binding the contract method 0x40c10f19.
|
|
//
|
|
// Solidity: function mint(address _to, uint256 _value) returns(bool)
|
|
func (_Token *TokenTransactorSession) Mint(_to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _Token.Contract.Mint(&_Token.TransactOpts, _to, _value)
|
|
}
|
|
|
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
|
//
|
|
// Solidity: function transfer(address _to, uint256 _value) returns(bool)
|
|
func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _Token.contract.Transact(opts, "transfer", _to, _value)
|
|
}
|
|
|
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
|
//
|
|
// Solidity: function transfer(address _to, uint256 _value) returns(bool)
|
|
func (_Token *TokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _Token.Contract.Transfer(&_Token.TransactOpts, _to, _value)
|
|
}
|
|
|
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
|
//
|
|
// Solidity: function transfer(address _to, uint256 _value) returns(bool)
|
|
func (_Token *TokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) {
|
|
return _Token.Contract.Transfer(&_Token.TransactOpts, _to, _value)
|
|
}
|