Documentation
¶
Index ¶
- Constants
- Variables
- func CalculateSafeTxHash(safeAddress common.Address, txData SafeTransactionData, chainID *big.Int) (common.Hash, error)
- func CreateGetMultipleNativeBalancesCommand() *cobra.Command
- func CreateGetSingleNativeBalanceCommand() *cobra.Command
- func CreateNativeBalancesCommand() *cobra.Command
- func CreateNativeBalancesDeploymentCommand() *cobra.Command
- func CreateSafeProposal(client *ethclient.Client, key *keystore.Key, safeAddress common.Address, ...) error
- func DeployWithSafe(client *ethclient.Client, key *keystore.Key, safeAddress common.Address, ...) error
- func KeyFromFile(keystoreFile string, password string) (*keystore.Key, error)
- func NewChainContext(timeout uint) (context.Context, context.CancelFunc)
- func NewClient(rpcURL string) (*ethclient.Client, error)
- func PredictDeploymentAddressSafe(from common.Address, salt [32]byte, deployBytecode []byte) (common.Address, error)
- func SetCallParametersFromArgs(opts *bind.CallOpts, pending bool, fromAddress, blockNumber string)
- func SetTransactionParametersFromArgs(opts *bind.TransactOpts, ...)
- func UnlockKeystore(keystoreData []byte, password string) (*keystore.Key, error)
- type NativeBalances
- type NativeBalancesCaller
- type NativeBalancesCallerRaw
- type NativeBalancesCallerSession
- type NativeBalancesFilterer
- type NativeBalancesRaw
- func (_NativeBalances *NativeBalancesRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_NativeBalances *NativeBalancesRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_NativeBalances *NativeBalancesRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type NativeBalancesSession
- type NativeBalancesTransactor
- type NativeBalancesTransactorRaw
- type NativeBalancesTransactorSession
- type SafeOperationType
- type SafeTransactionData
Constants ¶
const (
NativeTokenAddress = "0x0000000000000000000000000000000000000000"
)
Variables ¶
var ErrNoRPCURL error = errors.New("no RPC URL provided -- please pass an RPC URL from the command line or set the NATIVE_BALANCES_RPC_URL environment variable")
var NativeBalancesABI = NativeBalancesMetaData.ABI
NativeBalancesABI is the input ABI used to generate the binding from. Deprecated: Use NativeBalancesMetaData.ABI instead.
var NativeBalancesBin = NativeBalancesMetaData.Bin
NativeBalancesBin is the compiled bytecode used for deploying new contracts. Deprecated: Use NativeBalancesMetaData.Bin instead.
var NativeBalancesMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"users\",\"type\":\"address[]\"}],\"name\":\"getMultipleNativeBalances\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getSingleNativeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x6080604052348015600f57600080fd5b506102e48061001f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063cacf49651461003b578063d67809b614610064575b600080fd5b61004e610049366004610159565b61009a565b60405161005b91906101d0565b60405180910390f35b61008c610072366004610213565b73ffffffffffffffffffffffffffffffffffffffff163190565b60405190815260200161005b565b606060008267ffffffffffffffff8111156100b7576100b7610250565b6040519080825280602002602001820160405280156100e0578160200160208202803683370190505b50905060005b83811015610151578484828181106101005761010061027f565b90506020020160208101906101159190610213565b73ffffffffffffffffffffffffffffffffffffffff163182828151811061013e5761013e61027f565b60209081029190910101526001016100e6565b509392505050565b6000806020838503121561016c57600080fd5b823567ffffffffffffffff81111561018357600080fd5b8301601f8101851361019457600080fd5b803567ffffffffffffffff8111156101ab57600080fd5b8560208260051b84010111156101c057600080fd5b6020919091019590945092505050565b602080825282518282018190526000918401906040840190835b818110156102085783518352602093840193909201916001016101ea565b509095945050505050565b60006020828403121561022557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461024957600080fd5b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220b2f57a7f8392b2fe1569a8800fd5c16f5f5f991430d9cbe96bc16431d5dc4e7e64736f6c634300081c0033",
}
Functions ¶
func CalculateSafeTxHash ¶
func CreateSafeProposal ¶
func DeployWithSafe ¶
func KeyFromFile ¶
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 ¶
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 NATIVE_BALANCES_RPC_URL environment variable. If that is empty, too, then it returns an error.
func SetCallParametersFromArgs ¶
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).
Types ¶
type NativeBalances ¶
type NativeBalances struct { NativeBalancesCaller // Read-only binding to the contract NativeBalancesTransactor // Write-only binding to the contract NativeBalancesFilterer // Log filterer for contract events }
NativeBalances is an auto generated Go binding around an Ethereum contract.
func DeployNativeBalances ¶
func DeployNativeBalances(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *NativeBalances, error)
DeployNativeBalances deploys a new Ethereum contract, binding an instance of NativeBalances to it.
func NewNativeBalances ¶
func NewNativeBalances(address common.Address, backend bind.ContractBackend) (*NativeBalances, error)
NewNativeBalances creates a new instance of NativeBalances, bound to a specific deployed contract.
type NativeBalancesCaller ¶
type NativeBalancesCaller struct {
// contains filtered or unexported fields
}
NativeBalancesCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewNativeBalancesCaller ¶
func NewNativeBalancesCaller(address common.Address, caller bind.ContractCaller) (*NativeBalancesCaller, error)
NewNativeBalancesCaller creates a new read-only instance of NativeBalances, bound to a specific deployed contract.
func (*NativeBalancesCaller) GetMultipleNativeBalances ¶
func (_NativeBalances *NativeBalancesCaller) GetMultipleNativeBalances(opts *bind.CallOpts, users []common.Address) ([]*big.Int, error)
GetMultipleNativeBalances is a free data retrieval call binding the contract method 0xcacf4965.
Solidity: function getMultipleNativeBalances(address[] users) view returns(uint256[])
func (*NativeBalancesCaller) GetSingleNativeBalance ¶
func (_NativeBalances *NativeBalancesCaller) GetSingleNativeBalance(opts *bind.CallOpts, user common.Address) (*big.Int, error)
GetSingleNativeBalance is a free data retrieval call binding the contract method 0xd67809b6.
Solidity: function getSingleNativeBalance(address user) view returns(uint256)
type NativeBalancesCallerRaw ¶
type NativeBalancesCallerRaw struct {
Contract *NativeBalancesCaller // Generic read-only contract binding to access the raw methods on
}
NativeBalancesCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*NativeBalancesCallerRaw) Call ¶
func (_NativeBalances *NativeBalancesCallerRaw) 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 NativeBalancesCallerSession ¶
type NativeBalancesCallerSession struct { Contract *NativeBalancesCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
NativeBalancesCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*NativeBalancesCallerSession) GetMultipleNativeBalances ¶
func (_NativeBalances *NativeBalancesCallerSession) GetMultipleNativeBalances(users []common.Address) ([]*big.Int, error)
GetMultipleNativeBalances is a free data retrieval call binding the contract method 0xcacf4965.
Solidity: function getMultipleNativeBalances(address[] users) view returns(uint256[])
func (*NativeBalancesCallerSession) GetSingleNativeBalance ¶
func (_NativeBalances *NativeBalancesCallerSession) GetSingleNativeBalance(user common.Address) (*big.Int, error)
GetSingleNativeBalance is a free data retrieval call binding the contract method 0xd67809b6.
Solidity: function getSingleNativeBalance(address user) view returns(uint256)
type NativeBalancesFilterer ¶
type NativeBalancesFilterer struct {
// contains filtered or unexported fields
}
NativeBalancesFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewNativeBalancesFilterer ¶
func NewNativeBalancesFilterer(address common.Address, filterer bind.ContractFilterer) (*NativeBalancesFilterer, error)
NewNativeBalancesFilterer creates a new log filterer instance of NativeBalances, bound to a specific deployed contract.
type NativeBalancesRaw ¶
type NativeBalancesRaw struct {
Contract *NativeBalances // Generic contract binding to access the raw methods on
}
NativeBalancesRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*NativeBalancesRaw) Call ¶
func (_NativeBalances *NativeBalancesRaw) 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 (*NativeBalancesRaw) Transact ¶
func (_NativeBalances *NativeBalancesRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*NativeBalancesRaw) Transfer ¶
func (_NativeBalances *NativeBalancesRaw) 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 NativeBalancesSession ¶
type NativeBalancesSession struct { Contract *NativeBalances // 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 }
NativeBalancesSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*NativeBalancesSession) GetMultipleNativeBalances ¶
func (_NativeBalances *NativeBalancesSession) GetMultipleNativeBalances(users []common.Address) ([]*big.Int, error)
GetMultipleNativeBalances is a free data retrieval call binding the contract method 0xcacf4965.
Solidity: function getMultipleNativeBalances(address[] users) view returns(uint256[])
func (*NativeBalancesSession) GetSingleNativeBalance ¶
func (_NativeBalances *NativeBalancesSession) GetSingleNativeBalance(user common.Address) (*big.Int, error)
GetSingleNativeBalance is a free data retrieval call binding the contract method 0xd67809b6.
Solidity: function getSingleNativeBalance(address user) view returns(uint256)
type NativeBalancesTransactor ¶
type NativeBalancesTransactor struct {
// contains filtered or unexported fields
}
NativeBalancesTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewNativeBalancesTransactor ¶
func NewNativeBalancesTransactor(address common.Address, transactor bind.ContractTransactor) (*NativeBalancesTransactor, error)
NewNativeBalancesTransactor creates a new write-only instance of NativeBalances, bound to a specific deployed contract.
type NativeBalancesTransactorRaw ¶
type NativeBalancesTransactorRaw struct {
Contract *NativeBalancesTransactor // Generic write-only contract binding to access the raw methods on
}
NativeBalancesTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*NativeBalancesTransactorRaw) Transact ¶
func (_NativeBalances *NativeBalancesTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*NativeBalancesTransactorRaw) Transfer ¶
func (_NativeBalances *NativeBalancesTransactorRaw) 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 NativeBalancesTransactorSession ¶
type NativeBalancesTransactorSession struct { Contract *NativeBalancesTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
NativeBalancesTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
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