Metronome

package
v0.0.0-...-73c85e8 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NativeTokenAddress = "0x0000000000000000000000000000000000000000"
)

Variables

View Source
var ErrNoRPCURL error = errors.New("no RPC URL provided -- please pass an RPC URL from the command line or set the METRONOME_RPC_URL environment variable")
View Source
var MetronomeABI = MetronomeMetaData.ABI

MetronomeABI is the input ABI used to generate the binding from. Deprecated: Use MetronomeMetaData.ABI instead.

View Source
var MetronomeBin = MetronomeMetaData.Bin

MetronomeBin is the compiled bytecode used for deploying new contracts. Deprecated: Use MetronomeMetaData.Bin instead.

View Source
var MetronomeMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[],\"name\":\"InvalidSchedule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"scheduleID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BalanceIncreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"scheduleID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"payment\",\"type\":\"uint256\"}],\"name\":\"BountyClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"scheduleID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"remainder\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"divisor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bounty\",\"type\":\"uint256\"}],\"name\":\"ScheduleCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"ClaimedBounties\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NumSchedules\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"ScheduleBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"Schedules\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"remainder\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"divisor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bounty\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"scheduleID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"forAddress\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"scheduleIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"forAddress\",\"type\":\"address\"}],\"name\":\"claimBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"remainder\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"divisor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bounty\",\"type\":\"uint256\"}],\"name\":\"createSchedule\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"scheduleID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"scheduleID\",\"type\":\"uint256\"}],\"name\":\"increaseBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
	Bin: "0x608060405234801561001057600080fd5b506001600055610917806100256000396000f3fe60806040526004361061007b5760003560e01c80634a82fe981161004e5780634a82fe98146101295780635294bac8146101565780638c3f896e14610169578063ddd5e1b2146101bf57600080fd5b806314e6424c1461008057806318d052e3146100a95780631e2339e3146100cb5780633e4ccb4014610116575b600080fd5b34801561008c57600080fd5b5061009660045481565b6040519081526020015b60405180910390f35b3480156100b557600080fd5b506100c96100c4366004610663565b6101df565b005b3480156100d757600080fd5b506101066100e6366004610751565b600360209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100a0565b6100c9610124366004610773565b61022d565b34801561013557600080fd5b50610096610144366004610773565b60026020526000908152604090205481565b61009661016436600461078c565b610288565b34801561017557600080fd5b506101a4610184366004610773565b600160208190526000918252604090912080549181015460029091015483565b604080519384526020840192909252908201526060016100a0565b3480156101cb57600080fd5b506100c96101da3660046107b8565b610427565b6101e7610443565b60005b825181101561021e57610216838281518110610208576102086107e4565b602002602001015183610486565b6001016101ea565b506102296001600055565b5050565b6000818152600260205260408120805434929061024b908490610842565b909155505060405134815281907f4547cc37be8de03db39508613822773a49bc23d17ee4230fa6ec1a0c260156b79060200160405180910390a250565b6000826000036102c4576040517fdba16ce800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036102fe576040517fdba16ce800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828410610337576040517fdba16ce800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060048054908190600061034a8361085b565b909155505060408051606081018252858152602080820186815282840186815260008681526001938490528590209351845590519183019190915551600290910155518390859083907fbd7880573155705535dce3194981f4b25e22063a5619ea279e73b43b34831670906103c29087815260200190565b60405180910390a4341561042057600081815260026020526040908190203490819055905182917f4547cc37be8de03db39508613822773a49bc23d17ee4230fa6ec1a0c260156b79161041791815260200190565b60405180910390a25b9392505050565b61042f610443565b6104398282610486565b6102296001600055565b60026000540361047f576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b600082815260036020908152604080832043845290915290205460ff161580156104cd5750600082815260016020819052604090912080549101546104cb9043610893565b145b15610229576000828152600260208181526040808420546001909252909220015481111561050957506000828152600160205260409020600201545b8015610606576000838152600360209081526040808320438452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905585835260029091528120805483929061056b9084906108ce565b909155505060405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156105b3573d6000803e3d6000fd5b508173ffffffffffffffffffffffffffffffffffffffff16837f23c972d46b3251ae358ad69fb3761ef8f5c38c5131502ed9e9bde9b129da9215836040516105fd91815260200190565b60405180910390a35b505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461065e57600080fd5b919050565b6000806040838503121561067657600080fd5b823567ffffffffffffffff8082111561068e57600080fd5b818501915085601f8301126106a257600080fd5b81356020828211156106b6576106b661060b565b8160051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811086821117156106f9576106f961060b565b60405292835281830193508481018201928984111561071757600080fd5b948201945b838610156107355785358552948201949382019361071c565b9650610744905087820161063a565b9450505050509250929050565b6000806040838503121561076457600080fd5b50508035926020909101359150565b60006020828403121561078557600080fd5b5035919050565b6000806000606084860312156107a157600080fd5b505081359360208301359350604090920135919050565b600080604083850312156107cb57600080fd5b823591506107db6020840161063a565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561085557610855610813565b92915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361088c5761088c610813565b5060010190565b6000826108c9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b818103818111156108555761085561081356fea26469706673582212206a2c009a424938086f99d5a1171e4e60ed96858f3a37ab580ae8e4ca5dde8ccb64736f6c63430008180033",
}

Functions

func CalculateSafeTxHash

func CalculateSafeTxHash(safeAddress common.Address, txData SafeTransactionData, chainID *big.Int) (common.Hash, error)

func CreateClaimBatchCommand

func CreateClaimBatchCommand() *cobra.Command

func CreateClaimCommand

func CreateClaimCommand() *cobra.Command

func CreateClaimedBountiesCommand

func CreateClaimedBountiesCommand() *cobra.Command

func CreateCreateScheduleCommand

func CreateCreateScheduleCommand() *cobra.Command

func CreateIncreaseBalanceCommand

func CreateIncreaseBalanceCommand() *cobra.Command

func CreateMetronomeCommand

func CreateMetronomeCommand() *cobra.Command

func CreateMetronomeDeploymentCommand

func CreateMetronomeDeploymentCommand() *cobra.Command

func CreateNumSchedulesCommand

func CreateNumSchedulesCommand() *cobra.Command

func CreateSafeProposal

func CreateSafeProposal(client *ethclient.Client, key *keystore.Key, safeAddress common.Address, to common.Address, data []byte, value *big.Int, safeApi string, safeOperationType SafeOperationType, safeNonce *big.Int) error

func CreateScheduleBalancesCommand

func CreateScheduleBalancesCommand() *cobra.Command

func CreateSchedulesCommand

func CreateSchedulesCommand() *cobra.Command

func DeployWithSafe

func DeployWithSafe(client *ethclient.Client, key *keystore.Key, safeAddress common.Address, factoryAddress common.Address, value *big.Int, safeApi string, deployBytecode []byte, safeOperationType SafeOperationType, salt [32]byte, safeNonce *big.Int) error

func KeyFromFile

func KeyFromFile(keystoreFile string, password string) (*keystore.Key, error)

Loads a key from file, prompting the user for the password if it is not provided as a function argument.

func NewChainContext

func NewChainContext(timeout uint) (context.Context, context.CancelFunc)

Creates a new context to be used when interacting with the chain client.

func NewClient

func NewClient(rpcURL string) (*ethclient.Client, error)

Generates an Ethereum client to the JSONRPC API at the given URL. If rpcURL is empty, then it attempts to read the RPC URL from the METRONOME_RPC_URL environment variable. If that is empty, too, then it returns an error.

func PredictDeploymentAddressSafe

func PredictDeploymentAddressSafe(from common.Address, salt [32]byte, deployBytecode []byte) (common.Address, error)

func SetCallParametersFromArgs

func SetCallParametersFromArgs(opts *bind.CallOpts, pending bool, fromAddress, blockNumber string)

This method is used to set the parameters on a view call from command line arguments (represented mostly as strings).

func SetTransactionParametersFromArgs

func SetTransactionParametersFromArgs(opts *bind.TransactOpts, nonce, value, gasPrice, maxFeePerGas, maxPriorityFeePerGas string, gasLimit uint64, noSend bool)

This method is used to set the parameters on a transaction from command line arguments (represented mostly as strings).

func UnlockKeystore

func UnlockKeystore(keystoreData []byte, password string) (*keystore.Key, error)

Unlocks a key from a keystore (byte contents of a keystore file) with the given password.

Types

type Metronome

type Metronome struct {
	MetronomeCaller     // Read-only binding to the contract
	MetronomeTransactor // Write-only binding to the contract
	MetronomeFilterer   // Log filterer for contract events
}

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

func DeployMetronome

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

DeployMetronome deploys a new Ethereum contract, binding an instance of Metronome to it.

func NewMetronome

func NewMetronome(address common.Address, backend bind.ContractBackend) (*Metronome, error)

NewMetronome creates a new instance of Metronome, bound to a specific deployed contract.

type MetronomeBalanceIncreased

type MetronomeBalanceIncreased struct {
	ScheduleID *big.Int
	Amount     *big.Int
	Raw        types.Log // Blockchain specific contextual infos
}

MetronomeBalanceIncreased represents a BalanceIncreased event raised by the Metronome contract.

type MetronomeBalanceIncreasedIterator

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

MetronomeBalanceIncreasedIterator is returned from FilterBalanceIncreased and is used to iterate over the raw logs and unpacked data for BalanceIncreased events raised by the Metronome contract.

func (*MetronomeBalanceIncreasedIterator) Close

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

func (*MetronomeBalanceIncreasedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*MetronomeBalanceIncreasedIterator) Next

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 MetronomeBountyClaimed

type MetronomeBountyClaimed struct {
	ScheduleID *big.Int
	ForAddress common.Address
	Payment    *big.Int
	Raw        types.Log // Blockchain specific contextual infos
}

MetronomeBountyClaimed represents a BountyClaimed event raised by the Metronome contract.

type MetronomeBountyClaimedIterator

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

MetronomeBountyClaimedIterator is returned from FilterBountyClaimed and is used to iterate over the raw logs and unpacked data for BountyClaimed events raised by the Metronome contract.

func (*MetronomeBountyClaimedIterator) Close

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

func (*MetronomeBountyClaimedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*MetronomeBountyClaimedIterator) Next

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 MetronomeCaller

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

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

func NewMetronomeCaller

func NewMetronomeCaller(address common.Address, caller bind.ContractCaller) (*MetronomeCaller, error)

NewMetronomeCaller creates a new read-only instance of Metronome, bound to a specific deployed contract.

func (*MetronomeCaller) ClaimedBounties

func (_Metronome *MetronomeCaller) ClaimedBounties(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (bool, error)

ClaimedBounties is a free data retrieval call binding the contract method 0x1e2339e3.

Solidity: function ClaimedBounties(uint256 , uint256 ) view returns(bool)

func (*MetronomeCaller) NumSchedules

func (_Metronome *MetronomeCaller) NumSchedules(opts *bind.CallOpts) (*big.Int, error)

NumSchedules is a free data retrieval call binding the contract method 0x14e6424c.

Solidity: function NumSchedules() view returns(uint256)

func (*MetronomeCaller) ScheduleBalances

func (_Metronome *MetronomeCaller) ScheduleBalances(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error)

ScheduleBalances is a free data retrieval call binding the contract method 0x4a82fe98.

Solidity: function ScheduleBalances(uint256 ) view returns(uint256)

func (*MetronomeCaller) Schedules

func (_Metronome *MetronomeCaller) Schedules(opts *bind.CallOpts, arg0 *big.Int) (struct {
	Remainder *big.Int
	Divisor   *big.Int
	Bounty    *big.Int
}, error)

Schedules is a free data retrieval call binding the contract method 0x8c3f896e.

Solidity: function Schedules(uint256 ) view returns(uint256 remainder, uint256 divisor, uint256 bounty)

type MetronomeCallerRaw

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

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

func (*MetronomeCallerRaw) Call

func (_Metronome *MetronomeCallerRaw) 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 MetronomeCallerSession

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

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

func (*MetronomeCallerSession) ClaimedBounties

func (_Metronome *MetronomeCallerSession) ClaimedBounties(arg0 *big.Int, arg1 *big.Int) (bool, error)

ClaimedBounties is a free data retrieval call binding the contract method 0x1e2339e3.

Solidity: function ClaimedBounties(uint256 , uint256 ) view returns(bool)

func (*MetronomeCallerSession) NumSchedules

func (_Metronome *MetronomeCallerSession) NumSchedules() (*big.Int, error)

NumSchedules is a free data retrieval call binding the contract method 0x14e6424c.

Solidity: function NumSchedules() view returns(uint256)

func (*MetronomeCallerSession) ScheduleBalances

func (_Metronome *MetronomeCallerSession) ScheduleBalances(arg0 *big.Int) (*big.Int, error)

ScheduleBalances is a free data retrieval call binding the contract method 0x4a82fe98.

Solidity: function ScheduleBalances(uint256 ) view returns(uint256)

func (*MetronomeCallerSession) Schedules

func (_Metronome *MetronomeCallerSession) Schedules(arg0 *big.Int) (struct {
	Remainder *big.Int
	Divisor   *big.Int
	Bounty    *big.Int
}, error)

Schedules is a free data retrieval call binding the contract method 0x8c3f896e.

Solidity: function Schedules(uint256 ) view returns(uint256 remainder, uint256 divisor, uint256 bounty)

type MetronomeFilterer

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

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

func NewMetronomeFilterer

func NewMetronomeFilterer(address common.Address, filterer bind.ContractFilterer) (*MetronomeFilterer, error)

NewMetronomeFilterer creates a new log filterer instance of Metronome, bound to a specific deployed contract.

func (*MetronomeFilterer) FilterBalanceIncreased

func (_Metronome *MetronomeFilterer) FilterBalanceIncreased(opts *bind.FilterOpts, scheduleID []*big.Int) (*MetronomeBalanceIncreasedIterator, error)

FilterBalanceIncreased is a free log retrieval operation binding the contract event 0x4547cc37be8de03db39508613822773a49bc23d17ee4230fa6ec1a0c260156b7.

Solidity: event BalanceIncreased(uint256 indexed scheduleID, uint256 amount)

func (*MetronomeFilterer) FilterBountyClaimed

func (_Metronome *MetronomeFilterer) FilterBountyClaimed(opts *bind.FilterOpts, scheduleID []*big.Int, forAddress []common.Address) (*MetronomeBountyClaimedIterator, error)

FilterBountyClaimed is a free log retrieval operation binding the contract event 0x23c972d46b3251ae358ad69fb3761ef8f5c38c5131502ed9e9bde9b129da9215.

Solidity: event BountyClaimed(uint256 indexed scheduleID, address indexed forAddress, uint256 payment)

func (*MetronomeFilterer) FilterScheduleCreated

func (_Metronome *MetronomeFilterer) FilterScheduleCreated(opts *bind.FilterOpts, scheduleID []*big.Int, remainder []*big.Int, divisor []*big.Int) (*MetronomeScheduleCreatedIterator, error)

FilterScheduleCreated is a free log retrieval operation binding the contract event 0xbd7880573155705535dce3194981f4b25e22063a5619ea279e73b43b34831670.

Solidity: event ScheduleCreated(uint256 indexed scheduleID, uint256 indexed remainder, uint256 indexed divisor, uint256 bounty)

func (*MetronomeFilterer) ParseBalanceIncreased

func (_Metronome *MetronomeFilterer) ParseBalanceIncreased(log types.Log) (*MetronomeBalanceIncreased, error)

ParseBalanceIncreased is a log parse operation binding the contract event 0x4547cc37be8de03db39508613822773a49bc23d17ee4230fa6ec1a0c260156b7.

Solidity: event BalanceIncreased(uint256 indexed scheduleID, uint256 amount)

func (*MetronomeFilterer) ParseBountyClaimed

func (_Metronome *MetronomeFilterer) ParseBountyClaimed(log types.Log) (*MetronomeBountyClaimed, error)

ParseBountyClaimed is a log parse operation binding the contract event 0x23c972d46b3251ae358ad69fb3761ef8f5c38c5131502ed9e9bde9b129da9215.

Solidity: event BountyClaimed(uint256 indexed scheduleID, address indexed forAddress, uint256 payment)

func (*MetronomeFilterer) ParseScheduleCreated

func (_Metronome *MetronomeFilterer) ParseScheduleCreated(log types.Log) (*MetronomeScheduleCreated, error)

ParseScheduleCreated is a log parse operation binding the contract event 0xbd7880573155705535dce3194981f4b25e22063a5619ea279e73b43b34831670.

Solidity: event ScheduleCreated(uint256 indexed scheduleID, uint256 indexed remainder, uint256 indexed divisor, uint256 bounty)

func (*MetronomeFilterer) WatchBalanceIncreased

func (_Metronome *MetronomeFilterer) WatchBalanceIncreased(opts *bind.WatchOpts, sink chan<- *MetronomeBalanceIncreased, scheduleID []*big.Int) (event.Subscription, error)

WatchBalanceIncreased is a free log subscription operation binding the contract event 0x4547cc37be8de03db39508613822773a49bc23d17ee4230fa6ec1a0c260156b7.

Solidity: event BalanceIncreased(uint256 indexed scheduleID, uint256 amount)

func (*MetronomeFilterer) WatchBountyClaimed

func (_Metronome *MetronomeFilterer) WatchBountyClaimed(opts *bind.WatchOpts, sink chan<- *MetronomeBountyClaimed, scheduleID []*big.Int, forAddress []common.Address) (event.Subscription, error)

WatchBountyClaimed is a free log subscription operation binding the contract event 0x23c972d46b3251ae358ad69fb3761ef8f5c38c5131502ed9e9bde9b129da9215.

Solidity: event BountyClaimed(uint256 indexed scheduleID, address indexed forAddress, uint256 payment)

func (*MetronomeFilterer) WatchScheduleCreated

func (_Metronome *MetronomeFilterer) WatchScheduleCreated(opts *bind.WatchOpts, sink chan<- *MetronomeScheduleCreated, scheduleID []*big.Int, remainder []*big.Int, divisor []*big.Int) (event.Subscription, error)

WatchScheduleCreated is a free log subscription operation binding the contract event 0xbd7880573155705535dce3194981f4b25e22063a5619ea279e73b43b34831670.

Solidity: event ScheduleCreated(uint256 indexed scheduleID, uint256 indexed remainder, uint256 indexed divisor, uint256 bounty)

type MetronomeRaw

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

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

func (*MetronomeRaw) Call

func (_Metronome *MetronomeRaw) 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 (*MetronomeRaw) Transact

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

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

func (*MetronomeRaw) Transfer

func (_Metronome *MetronomeRaw) 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 MetronomeScheduleCreated

type MetronomeScheduleCreated struct {
	ScheduleID *big.Int
	Remainder  *big.Int
	Divisor    *big.Int
	Bounty     *big.Int
	Raw        types.Log // Blockchain specific contextual infos
}

MetronomeScheduleCreated represents a ScheduleCreated event raised by the Metronome contract.

type MetronomeScheduleCreatedIterator

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

MetronomeScheduleCreatedIterator is returned from FilterScheduleCreated and is used to iterate over the raw logs and unpacked data for ScheduleCreated events raised by the Metronome contract.

func (*MetronomeScheduleCreatedIterator) Close

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

func (*MetronomeScheduleCreatedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*MetronomeScheduleCreatedIterator) Next

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 MetronomeSession

type MetronomeSession struct {
	Contract     *Metronome        // 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
}

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

func (*MetronomeSession) Claim

func (_Metronome *MetronomeSession) Claim(scheduleID *big.Int, forAddress common.Address) (*types.Transaction, error)

Claim is a paid mutator transaction binding the contract method 0xddd5e1b2.

Solidity: function claim(uint256 scheduleID, address forAddress) returns()

func (*MetronomeSession) ClaimBatch

func (_Metronome *MetronomeSession) ClaimBatch(scheduleIDs []*big.Int, forAddress common.Address) (*types.Transaction, error)

ClaimBatch is a paid mutator transaction binding the contract method 0x18d052e3.

Solidity: function claimBatch(uint256[] scheduleIDs, address forAddress) returns()

func (*MetronomeSession) ClaimedBounties

func (_Metronome *MetronomeSession) ClaimedBounties(arg0 *big.Int, arg1 *big.Int) (bool, error)

ClaimedBounties is a free data retrieval call binding the contract method 0x1e2339e3.

Solidity: function ClaimedBounties(uint256 , uint256 ) view returns(bool)

func (*MetronomeSession) CreateSchedule

func (_Metronome *MetronomeSession) CreateSchedule(remainder *big.Int, divisor *big.Int, bounty *big.Int) (*types.Transaction, error)

CreateSchedule is a paid mutator transaction binding the contract method 0x5294bac8.

Solidity: function createSchedule(uint256 remainder, uint256 divisor, uint256 bounty) payable returns(uint256 scheduleID)

func (*MetronomeSession) IncreaseBalance

func (_Metronome *MetronomeSession) IncreaseBalance(scheduleID *big.Int) (*types.Transaction, error)

IncreaseBalance is a paid mutator transaction binding the contract method 0x3e4ccb40.

Solidity: function increaseBalance(uint256 scheduleID) payable returns()

func (*MetronomeSession) NumSchedules

func (_Metronome *MetronomeSession) NumSchedules() (*big.Int, error)

NumSchedules is a free data retrieval call binding the contract method 0x14e6424c.

Solidity: function NumSchedules() view returns(uint256)

func (*MetronomeSession) ScheduleBalances

func (_Metronome *MetronomeSession) ScheduleBalances(arg0 *big.Int) (*big.Int, error)

ScheduleBalances is a free data retrieval call binding the contract method 0x4a82fe98.

Solidity: function ScheduleBalances(uint256 ) view returns(uint256)

func (*MetronomeSession) Schedules

func (_Metronome *MetronomeSession) Schedules(arg0 *big.Int) (struct {
	Remainder *big.Int
	Divisor   *big.Int
	Bounty    *big.Int
}, error)

Schedules is a free data retrieval call binding the contract method 0x8c3f896e.

Solidity: function Schedules(uint256 ) view returns(uint256 remainder, uint256 divisor, uint256 bounty)

type MetronomeTransactor

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

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

func NewMetronomeTransactor

func NewMetronomeTransactor(address common.Address, transactor bind.ContractTransactor) (*MetronomeTransactor, error)

NewMetronomeTransactor creates a new write-only instance of Metronome, bound to a specific deployed contract.

func (*MetronomeTransactor) Claim

func (_Metronome *MetronomeTransactor) Claim(opts *bind.TransactOpts, scheduleID *big.Int, forAddress common.Address) (*types.Transaction, error)

Claim is a paid mutator transaction binding the contract method 0xddd5e1b2.

Solidity: function claim(uint256 scheduleID, address forAddress) returns()

func (*MetronomeTransactor) ClaimBatch

func (_Metronome *MetronomeTransactor) ClaimBatch(opts *bind.TransactOpts, scheduleIDs []*big.Int, forAddress common.Address) (*types.Transaction, error)

ClaimBatch is a paid mutator transaction binding the contract method 0x18d052e3.

Solidity: function claimBatch(uint256[] scheduleIDs, address forAddress) returns()

func (*MetronomeTransactor) CreateSchedule

func (_Metronome *MetronomeTransactor) CreateSchedule(opts *bind.TransactOpts, remainder *big.Int, divisor *big.Int, bounty *big.Int) (*types.Transaction, error)

CreateSchedule is a paid mutator transaction binding the contract method 0x5294bac8.

Solidity: function createSchedule(uint256 remainder, uint256 divisor, uint256 bounty) payable returns(uint256 scheduleID)

func (*MetronomeTransactor) IncreaseBalance

func (_Metronome *MetronomeTransactor) IncreaseBalance(opts *bind.TransactOpts, scheduleID *big.Int) (*types.Transaction, error)

IncreaseBalance is a paid mutator transaction binding the contract method 0x3e4ccb40.

Solidity: function increaseBalance(uint256 scheduleID) payable returns()

type MetronomeTransactorRaw

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

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

func (*MetronomeTransactorRaw) Transact

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

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

func (*MetronomeTransactorRaw) Transfer

func (_Metronome *MetronomeTransactorRaw) 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 MetronomeTransactorSession

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

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

func (*MetronomeTransactorSession) Claim

func (_Metronome *MetronomeTransactorSession) Claim(scheduleID *big.Int, forAddress common.Address) (*types.Transaction, error)

Claim is a paid mutator transaction binding the contract method 0xddd5e1b2.

Solidity: function claim(uint256 scheduleID, address forAddress) returns()

func (*MetronomeTransactorSession) ClaimBatch

func (_Metronome *MetronomeTransactorSession) ClaimBatch(scheduleIDs []*big.Int, forAddress common.Address) (*types.Transaction, error)

ClaimBatch is a paid mutator transaction binding the contract method 0x18d052e3.

Solidity: function claimBatch(uint256[] scheduleIDs, address forAddress) returns()

func (*MetronomeTransactorSession) CreateSchedule

func (_Metronome *MetronomeTransactorSession) CreateSchedule(remainder *big.Int, divisor *big.Int, bounty *big.Int) (*types.Transaction, error)

CreateSchedule is a paid mutator transaction binding the contract method 0x5294bac8.

Solidity: function createSchedule(uint256 remainder, uint256 divisor, uint256 bounty) payable returns(uint256 scheduleID)

func (*MetronomeTransactorSession) IncreaseBalance

func (_Metronome *MetronomeTransactorSession) IncreaseBalance(scheduleID *big.Int) (*types.Transaction, error)

IncreaseBalance is a paid mutator transaction binding the contract method 0x3e4ccb40.

Solidity: function increaseBalance(uint256 scheduleID) payable returns()

type SafeOperationType

type SafeOperationType uint8

SafeOperationType represents the type of operation for a Safe transaction

const (
	Call         SafeOperationType = 0
	DelegateCall SafeOperationType = 1
)

func (SafeOperationType) String

func (o SafeOperationType) String() string

String returns the string representation of the SafeOperationType

type SafeTransactionData

type SafeTransactionData struct {
	To             string            `json:"to"`
	Value          string            `json:"value"`
	Data           string            `json:"data"`
	Operation      SafeOperationType `json:"operation"`
	SafeTxGas      uint64            `json:"safeTxGas"`
	BaseGas        uint64            `json:"baseGas"`
	GasPrice       string            `json:"gasPrice"`
	GasToken       string            `json:"gasToken"`
	RefundReceiver string            `json:"refundReceiver"`
	Nonce          *big.Int          `json:"nonce"`
	SafeTxHash     string            `json:"safeTxHash"`
	Sender         string            `json:"sender"`
	Signature      string            `json:"signature"`
	Origin         string            `json:"origin"`
}

SafeTransactionData represents the data for a Safe transaction

Jump to

Keyboard shortcuts

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