counter

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Code generated by synapse abigen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var Contracts map[string]*compiler.Contract

Contracts are unmarshalled on start

View Source
var CounterABI = CounterMetaData.ABI

CounterABI is the input ABI used to generate the binding from. Deprecated: Use CounterMetaData.ABI instead.

View Source
var CounterBin = CounterMetaData.Bin

CounterBin is the compiled bytecode used for deploying new contracts. Deprecated: Use CounterMetaData.Bin instead.

View Source
var CounterFuncSigs = CounterMetaData.Sigs

Deprecated: Use CounterMetaData.Sigs instead. CounterFuncSigs maps the 4-byte function signature to its string representation.

View Source
var CounterMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"count\",\"type\":\"int256\"}],\"name\":\"Decremented\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"count\",\"type\":\"int256\"}],\"name\":\"Incremented\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"count\",\"type\":\"int256\"}],\"name\":\"IncrementedByUser\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"decrementCounter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deployBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCount\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVitalikCount\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"incrementCounter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vitalikIncrement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
	Sigs: map[string]string{
		"f5c5ad83": "decrementCounter()",
		"a3ec191a": "deployBlock()",
		"a87d942c": "getCount()",
		"9f6f1ec1": "getVitalikCount()",
		"5b34b966": "incrementCounter()",
		"6c573535": "vitalikIncrement()",
	},
	Bin: "0x60a060405260008055600060015534801561001957600080fd5b5043608052608051610390610038600039600060a401526103906000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063a3ec191a11610050578063a3ec191a1461009f578063a87d942c146100c6578063f5c5ad83146100ce57600080fd5b80635b34b966146100775780636c573535146100815780639f6f1ec114610089575b600080fd5b61007f6100d6565b005b61007f610126565b6001545b60405190815260200160405180910390f35b61008d7f000000000000000000000000000000000000000000000000000000000000000081565b60005461008d565b61007f6101f9565b60016000808282546100e89190610243565b90915550506000546040519081527fda0bc8b9b52da793a50e130494716550dab510a10a485be3f1b23d4da60ff4be906020015b60405180910390a1565b3373d8da6bf26964af9d7eed9e03e53415d37aa96045146101a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4f6e6c7920566974616c696b2063616e20636f756e7420627920313000000000604482015260640160405180910390fd5b600a600160008282546101ba9190610243565b90915550506001546040805133815260208101929092527f5832be325e40e91e7a991db4415bdfa9c689e8007072fdb8de3be47757a14557910161011c565b600160008082825461020b91906102b7565b90915550506000546040519081527f22ccb5ba3d32a9221c3efe39ffab06d1ddc4bd6684975ea75fa60f95ccff53de9060200161011c565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0384138115161561027d5761027d61032b565b827f80000000000000000000000000000000000000000000000000000000000000000384128116156102b1576102b161032b565b50500190565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156102f1576102f161032b565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156103255761032561032b565b50500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220dd6810ba2d049a0f7354bf12f6a017744c806f0470f592679a80ef552f69b85164736f6c63430008040033",
}

CounterMetaData contains all meta data concerning the Counter contract.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	CounterCaller     // Read-only binding to the contract
	CounterTransactor // Write-only binding to the contract
	CounterFilterer   // Log filterer for contract events
}

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

func DeployCounter

func DeployCounter(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Counter, error)

DeployCounter deploys a new Ethereum contract, binding an instance of Counter to it.

func NewCounter

func NewCounter(address common.Address, backend bind.ContractBackend) (*Counter, error)

NewCounter creates a new instance of Counter, bound to a specific deployed contract.

type CounterCaller

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

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

func NewCounterCaller

func NewCounterCaller(address common.Address, caller bind.ContractCaller) (*CounterCaller, error)

NewCounterCaller creates a new read-only instance of Counter, bound to a specific deployed contract.

func (*CounterCaller) DeployBlock added in v0.1.26

func (_Counter *CounterCaller) DeployBlock(opts *bind.CallOpts) (*big.Int, error)

DeployBlock is a free data retrieval call binding the contract method 0xa3ec191a.

Solidity: function deployBlock() view returns(uint256)

func (*CounterCaller) GetCount

func (_Counter *CounterCaller) GetCount(opts *bind.CallOpts) (*big.Int, error)

GetCount is a free data retrieval call binding the contract method 0xa87d942c.

Solidity: function getCount() view returns(int256)

func (*CounterCaller) GetVitalikCount added in v0.0.43

func (_Counter *CounterCaller) GetVitalikCount(opts *bind.CallOpts) (*big.Int, error)

GetVitalikCount is a free data retrieval call binding the contract method 0x9f6f1ec1.

Solidity: function getVitalikCount() view returns(int256)

type CounterCallerRaw

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

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

func (*CounterCallerRaw) Call

func (_Counter *CounterCallerRaw) 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 CounterCallerSession

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

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

func (*CounterCallerSession) DeployBlock added in v0.1.26

func (_Counter *CounterCallerSession) DeployBlock() (*big.Int, error)

DeployBlock is a free data retrieval call binding the contract method 0xa3ec191a.

Solidity: function deployBlock() view returns(uint256)

func (*CounterCallerSession) GetCount

func (_Counter *CounterCallerSession) GetCount() (*big.Int, error)

GetCount is a free data retrieval call binding the contract method 0xa87d942c.

Solidity: function getCount() view returns(int256)

func (*CounterCallerSession) GetVitalikCount added in v0.0.43

func (_Counter *CounterCallerSession) GetVitalikCount() (*big.Int, error)

GetVitalikCount is a free data retrieval call binding the contract method 0x9f6f1ec1.

Solidity: function getVitalikCount() view returns(int256)

type CounterDecremented added in v0.1.26

type CounterDecremented struct {
	Count *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

CounterDecremented represents a Decremented event raised by the Counter contract.

type CounterDecrementedIterator added in v0.1.26

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

CounterDecrementedIterator is returned from FilterDecremented and is used to iterate over the raw logs and unpacked data for Decremented events raised by the Counter contract.

func (*CounterDecrementedIterator) Close added in v0.1.26

func (it *CounterDecrementedIterator) Close() error

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

func (*CounterDecrementedIterator) Error added in v0.1.26

func (it *CounterDecrementedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*CounterDecrementedIterator) Next added in v0.1.26

func (it *CounterDecrementedIterator) 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 CounterFilterer

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

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

func NewCounterFilterer

func NewCounterFilterer(address common.Address, filterer bind.ContractFilterer) (*CounterFilterer, error)

NewCounterFilterer creates a new log filterer instance of Counter, bound to a specific deployed contract.

func (*CounterFilterer) FilterDecremented added in v0.1.26

func (_Counter *CounterFilterer) FilterDecremented(opts *bind.FilterOpts) (*CounterDecrementedIterator, error)

FilterDecremented is a free log retrieval operation binding the contract event 0x22ccb5ba3d32a9221c3efe39ffab06d1ddc4bd6684975ea75fa60f95ccff53de.

Solidity: event Decremented(int256 count)

func (*CounterFilterer) FilterIncremented added in v0.1.26

func (_Counter *CounterFilterer) FilterIncremented(opts *bind.FilterOpts) (*CounterIncrementedIterator, error)

FilterIncremented is a free log retrieval operation binding the contract event 0xda0bc8b9b52da793a50e130494716550dab510a10a485be3f1b23d4da60ff4be.

Solidity: event Incremented(int256 count)

func (*CounterFilterer) FilterIncrementedByUser added in v0.1.26

func (_Counter *CounterFilterer) FilterIncrementedByUser(opts *bind.FilterOpts) (*CounterIncrementedByUserIterator, error)

FilterIncrementedByUser is a free log retrieval operation binding the contract event 0x5832be325e40e91e7a991db4415bdfa9c689e8007072fdb8de3be47757a14557.

Solidity: event IncrementedByUser(address user, int256 count)

func (*CounterFilterer) ParseDecremented added in v0.1.26

func (_Counter *CounterFilterer) ParseDecremented(log types.Log) (*CounterDecremented, error)

ParseDecremented is a log parse operation binding the contract event 0x22ccb5ba3d32a9221c3efe39ffab06d1ddc4bd6684975ea75fa60f95ccff53de.

Solidity: event Decremented(int256 count)

func (*CounterFilterer) ParseIncremented added in v0.1.26

func (_Counter *CounterFilterer) ParseIncremented(log types.Log) (*CounterIncremented, error)

ParseIncremented is a log parse operation binding the contract event 0xda0bc8b9b52da793a50e130494716550dab510a10a485be3f1b23d4da60ff4be.

Solidity: event Incremented(int256 count)

func (*CounterFilterer) ParseIncrementedByUser added in v0.1.26

func (_Counter *CounterFilterer) ParseIncrementedByUser(log types.Log) (*CounterIncrementedByUser, error)

ParseIncrementedByUser is a log parse operation binding the contract event 0x5832be325e40e91e7a991db4415bdfa9c689e8007072fdb8de3be47757a14557.

Solidity: event IncrementedByUser(address user, int256 count)

func (*CounterFilterer) WatchDecremented added in v0.1.26

func (_Counter *CounterFilterer) WatchDecremented(opts *bind.WatchOpts, sink chan<- *CounterDecremented) (event.Subscription, error)

WatchDecremented is a free log subscription operation binding the contract event 0x22ccb5ba3d32a9221c3efe39ffab06d1ddc4bd6684975ea75fa60f95ccff53de.

Solidity: event Decremented(int256 count)

func (*CounterFilterer) WatchIncremented added in v0.1.26

func (_Counter *CounterFilterer) WatchIncremented(opts *bind.WatchOpts, sink chan<- *CounterIncremented) (event.Subscription, error)

WatchIncremented is a free log subscription operation binding the contract event 0xda0bc8b9b52da793a50e130494716550dab510a10a485be3f1b23d4da60ff4be.

Solidity: event Incremented(int256 count)

func (*CounterFilterer) WatchIncrementedByUser added in v0.1.26

func (_Counter *CounterFilterer) WatchIncrementedByUser(opts *bind.WatchOpts, sink chan<- *CounterIncrementedByUser) (event.Subscription, error)

WatchIncrementedByUser is a free log subscription operation binding the contract event 0x5832be325e40e91e7a991db4415bdfa9c689e8007072fdb8de3be47757a14557.

Solidity: event IncrementedByUser(address user, int256 count)

type CounterIncremented added in v0.1.26

type CounterIncremented struct {
	Count *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

CounterIncremented represents a Incremented event raised by the Counter contract.

type CounterIncrementedByUser added in v0.1.26

type CounterIncrementedByUser struct {
	User  common.Address
	Count *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

CounterIncrementedByUser represents a IncrementedByUser event raised by the Counter contract.

type CounterIncrementedByUserIterator added in v0.1.26

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

CounterIncrementedByUserIterator is returned from FilterIncrementedByUser and is used to iterate over the raw logs and unpacked data for IncrementedByUser events raised by the Counter contract.

func (*CounterIncrementedByUserIterator) Close added in v0.1.26

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

func (*CounterIncrementedByUserIterator) Error added in v0.1.26

Error returns any retrieval or parsing error occurred during filtering.

func (*CounterIncrementedByUserIterator) Next added in v0.1.26

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 CounterIncrementedIterator added in v0.1.26

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

CounterIncrementedIterator is returned from FilterIncremented and is used to iterate over the raw logs and unpacked data for Incremented events raised by the Counter contract.

func (*CounterIncrementedIterator) Close added in v0.1.26

func (it *CounterIncrementedIterator) Close() error

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

func (*CounterIncrementedIterator) Error added in v0.1.26

func (it *CounterIncrementedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*CounterIncrementedIterator) Next added in v0.1.26

func (it *CounterIncrementedIterator) 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 CounterRaw

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

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

func (*CounterRaw) Call

func (_Counter *CounterRaw) 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 (*CounterRaw) Transact

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

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

func (*CounterRaw) Transfer

func (_Counter *CounterRaw) 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 CounterRef added in v0.0.46

type CounterRef struct {
	*Counter
	// contains filtered or unexported fields
}

CounterRef is a bound counter.

func NewCounterRef added in v0.0.46

func NewCounterRef(address common.Address, backend bind.ContractBackend) (*CounterRef, error)

NewCounterRef creates a new test client.

func (CounterRef) Address added in v0.0.46

func (a CounterRef) Address() common.Address

Address gets the address of the contract.

type CounterSession

type CounterSession struct {
	Contract     *Counter          // 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
}

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

func (*CounterSession) DecrementCounter

func (_Counter *CounterSession) DecrementCounter() (*types.Transaction, error)

DecrementCounter is a paid mutator transaction binding the contract method 0xf5c5ad83.

Solidity: function decrementCounter() returns()

func (*CounterSession) DeployBlock added in v0.1.26

func (_Counter *CounterSession) DeployBlock() (*big.Int, error)

DeployBlock is a free data retrieval call binding the contract method 0xa3ec191a.

Solidity: function deployBlock() view returns(uint256)

func (*CounterSession) GetCount

func (_Counter *CounterSession) GetCount() (*big.Int, error)

GetCount is a free data retrieval call binding the contract method 0xa87d942c.

Solidity: function getCount() view returns(int256)

func (*CounterSession) GetVitalikCount added in v0.0.43

func (_Counter *CounterSession) GetVitalikCount() (*big.Int, error)

GetVitalikCount is a free data retrieval call binding the contract method 0x9f6f1ec1.

Solidity: function getVitalikCount() view returns(int256)

func (*CounterSession) IncrementCounter

func (_Counter *CounterSession) IncrementCounter() (*types.Transaction, error)

IncrementCounter is a paid mutator transaction binding the contract method 0x5b34b966.

Solidity: function incrementCounter() returns()

func (*CounterSession) VitalikIncrement added in v0.0.43

func (_Counter *CounterSession) VitalikIncrement() (*types.Transaction, error)

VitalikIncrement is a paid mutator transaction binding the contract method 0x6c573535.

Solidity: function vitalikIncrement() returns()

type CounterTransactor

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

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

func NewCounterTransactor

func NewCounterTransactor(address common.Address, transactor bind.ContractTransactor) (*CounterTransactor, error)

NewCounterTransactor creates a new write-only instance of Counter, bound to a specific deployed contract.

func (*CounterTransactor) DecrementCounter

func (_Counter *CounterTransactor) DecrementCounter(opts *bind.TransactOpts) (*types.Transaction, error)

DecrementCounter is a paid mutator transaction binding the contract method 0xf5c5ad83.

Solidity: function decrementCounter() returns()

func (*CounterTransactor) IncrementCounter

func (_Counter *CounterTransactor) IncrementCounter(opts *bind.TransactOpts) (*types.Transaction, error)

IncrementCounter is a paid mutator transaction binding the contract method 0x5b34b966.

Solidity: function incrementCounter() returns()

func (*CounterTransactor) VitalikIncrement added in v0.0.43

func (_Counter *CounterTransactor) VitalikIncrement(opts *bind.TransactOpts) (*types.Transaction, error)

VitalikIncrement is a paid mutator transaction binding the contract method 0x6c573535.

Solidity: function vitalikIncrement() returns()

type CounterTransactorRaw

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

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

func (*CounterTransactorRaw) Transact

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

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

func (*CounterTransactorRaw) Transfer

func (_Counter *CounterTransactorRaw) 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 CounterTransactorSession

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

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

func (*CounterTransactorSession) DecrementCounter

func (_Counter *CounterTransactorSession) DecrementCounter() (*types.Transaction, error)

DecrementCounter is a paid mutator transaction binding the contract method 0xf5c5ad83.

Solidity: function decrementCounter() returns()

func (*CounterTransactorSession) IncrementCounter

func (_Counter *CounterTransactorSession) IncrementCounter() (*types.Transaction, error)

IncrementCounter is a paid mutator transaction binding the contract method 0x5b34b966.

Solidity: function incrementCounter() returns()

func (*CounterTransactorSession) VitalikIncrement added in v0.0.43

func (_Counter *CounterTransactorSession) VitalikIncrement() (*types.Transaction, error)

VitalikIncrement is a paid mutator transaction binding the contract method 0x6c573535.

Solidity: function vitalikIncrement() returns()

Jump to

Keyboard shortcuts

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