Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateSafeTxHash(safeAddress common.Address, txData SafeTransactionData, chainID *big.Int) (common.Hash, error)
- func CreateOwnerCommand() *cobra.Command
- func CreateOwnershipFacetCommand() *cobra.Command
- func CreateOwnershipFacetDeploymentCommand() *cobra.Command
- func CreateSafeProposal(client *ethclient.Client, key *keystore.Key, safeAddress common.Address, ...) error
- func CreateTransferOwnershipCommand() *cobra.Command
- 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 OwnershipFacet
- type OwnershipFacetCaller
- type OwnershipFacetCallerRaw
- type OwnershipFacetCallerSession
- type OwnershipFacetFilterer
- func (_OwnershipFacet *OwnershipFacetFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, ...) (*OwnershipFacetOwnershipTransferredIterator, error)
- func (_OwnershipFacet *OwnershipFacetFilterer) FilterOwnershipTransferred0(opts *bind.FilterOpts, previousOwner []common.Address, ...) (*OwnershipFacetOwnershipTransferred0Iterator, error)
- func (_OwnershipFacet *OwnershipFacetFilterer) ParseOwnershipTransferred(log types.Log) (*OwnershipFacetOwnershipTransferred, error)
- func (_OwnershipFacet *OwnershipFacetFilterer) ParseOwnershipTransferred0(log types.Log) (*OwnershipFacetOwnershipTransferred0, error)
- func (_OwnershipFacet *OwnershipFacetFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnershipFacetOwnershipTransferred, ...) (event.Subscription, error)
- func (_OwnershipFacet *OwnershipFacetFilterer) WatchOwnershipTransferred0(opts *bind.WatchOpts, sink chan<- *OwnershipFacetOwnershipTransferred0, ...) (event.Subscription, error)
- type OwnershipFacetOwnershipTransferred
- type OwnershipFacetOwnershipTransferred0
- type OwnershipFacetOwnershipTransferred0Iterator
- type OwnershipFacetOwnershipTransferredIterator
- type OwnershipFacetRaw
- func (_OwnershipFacet *OwnershipFacetRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_OwnershipFacet *OwnershipFacetRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_OwnershipFacet *OwnershipFacetRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type OwnershipFacetSession
- type OwnershipFacetTransactor
- type OwnershipFacetTransactorRaw
- type OwnershipFacetTransactorSession
- 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 OWNERSHIP_FACET_RPC_URL environment variable")
var OwnershipFacetABI = OwnershipFacetMetaData.ABI
OwnershipFacetABI is the input ABI used to generate the binding from. Deprecated: Use OwnershipFacetMetaData.ABI instead.
var OwnershipFacetBin = OwnershipFacetMetaData.Bin
OwnershipFacetBin is the compiled bytecode used for deploying new contracts. Deprecated: Use OwnershipFacetMetaData.Bin instead.
var OwnershipFacetMetaData = &bind.MetaData{
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
Bin: "0x6080604052348015600f57600080fd5b506102d68061001f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80638da5cb5b1461003b578063f2fde38b1461006c575b600080fd5b610043610081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61007f61007a366004610263565b6100c6565b005b60006100c17fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b6100ce6100da565b6100d7816101a9565b50565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff1633146101a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f6572000000000000000000000000000000000000000000000000000000000000606482015260840160405180910390fd5b565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c132080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff8481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60006020828403121561027557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461029957600080fd5b939250505056fea2646970667358221220cfe9f0e1592cd35d9ca723fae3f01c9e9c9784812ae8444d79757f4ecb46c7d264736f6c634300081c0033",
}
Functions ¶
func CalculateSafeTxHash ¶
func CreateOwnerCommand ¶
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 OWNERSHIP_FACET_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 OwnershipFacet ¶
type OwnershipFacet struct { OwnershipFacetCaller // Read-only binding to the contract OwnershipFacetTransactor // Write-only binding to the contract OwnershipFacetFilterer // Log filterer for contract events }
OwnershipFacet is an auto generated Go binding around an Ethereum contract.
func DeployOwnershipFacet ¶
func DeployOwnershipFacet(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *OwnershipFacet, error)
DeployOwnershipFacet deploys a new Ethereum contract, binding an instance of OwnershipFacet to it.
func NewOwnershipFacet ¶
func NewOwnershipFacet(address common.Address, backend bind.ContractBackend) (*OwnershipFacet, error)
NewOwnershipFacet creates a new instance of OwnershipFacet, bound to a specific deployed contract.
type OwnershipFacetCaller ¶
type OwnershipFacetCaller struct {
// contains filtered or unexported fields
}
OwnershipFacetCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewOwnershipFacetCaller ¶
func NewOwnershipFacetCaller(address common.Address, caller bind.ContractCaller) (*OwnershipFacetCaller, error)
NewOwnershipFacetCaller creates a new read-only instance of OwnershipFacet, bound to a specific deployed contract.
type OwnershipFacetCallerRaw ¶
type OwnershipFacetCallerRaw struct {
Contract *OwnershipFacetCaller // Generic read-only contract binding to access the raw methods on
}
OwnershipFacetCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*OwnershipFacetCallerRaw) Call ¶
func (_OwnershipFacet *OwnershipFacetCallerRaw) 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 OwnershipFacetCallerSession ¶
type OwnershipFacetCallerSession struct { Contract *OwnershipFacetCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
OwnershipFacetCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
type OwnershipFacetFilterer ¶
type OwnershipFacetFilterer struct {
// contains filtered or unexported fields
}
OwnershipFacetFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewOwnershipFacetFilterer ¶
func NewOwnershipFacetFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnershipFacetFilterer, error)
NewOwnershipFacetFilterer creates a new log filterer instance of OwnershipFacet, bound to a specific deployed contract.
func (*OwnershipFacetFilterer) FilterOwnershipTransferred ¶
func (_OwnershipFacet *OwnershipFacetFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnershipFacetOwnershipTransferredIterator, error)
FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (*OwnershipFacetFilterer) FilterOwnershipTransferred0 ¶
func (_OwnershipFacet *OwnershipFacetFilterer) FilterOwnershipTransferred0(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnershipFacetOwnershipTransferred0Iterator, error)
FilterOwnershipTransferred0 is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (*OwnershipFacetFilterer) ParseOwnershipTransferred ¶
func (_OwnershipFacet *OwnershipFacetFilterer) ParseOwnershipTransferred(log types.Log) (*OwnershipFacetOwnershipTransferred, error)
ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (*OwnershipFacetFilterer) ParseOwnershipTransferred0 ¶
func (_OwnershipFacet *OwnershipFacetFilterer) ParseOwnershipTransferred0(log types.Log) (*OwnershipFacetOwnershipTransferred0, error)
ParseOwnershipTransferred0 is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (*OwnershipFacetFilterer) WatchOwnershipTransferred ¶
func (_OwnershipFacet *OwnershipFacetFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnershipFacetOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error)
WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (*OwnershipFacetFilterer) WatchOwnershipTransferred0 ¶
func (_OwnershipFacet *OwnershipFacetFilterer) WatchOwnershipTransferred0(opts *bind.WatchOpts, sink chan<- *OwnershipFacetOwnershipTransferred0, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error)
WatchOwnershipTransferred0 is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
type OwnershipFacetOwnershipTransferred ¶
type OwnershipFacetOwnershipTransferred struct { PreviousOwner common.Address NewOwner common.Address Raw types.Log // Blockchain specific contextual infos }
OwnershipFacetOwnershipTransferred represents a OwnershipTransferred event raised by the OwnershipFacet contract.
type OwnershipFacetOwnershipTransferred0 ¶
type OwnershipFacetOwnershipTransferred0 struct { PreviousOwner common.Address NewOwner common.Address Raw types.Log // Blockchain specific contextual infos }
OwnershipFacetOwnershipTransferred0 represents a OwnershipTransferred0 event raised by the OwnershipFacet contract.
type OwnershipFacetOwnershipTransferred0Iterator ¶
type OwnershipFacetOwnershipTransferred0Iterator struct { Event *OwnershipFacetOwnershipTransferred0 // Event containing the contract specifics and raw log // contains filtered or unexported fields }
OwnershipFacetOwnershipTransferred0Iterator is returned from FilterOwnershipTransferred0 and is used to iterate over the raw logs and unpacked data for OwnershipTransferred0 events raised by the OwnershipFacet contract.
func (*OwnershipFacetOwnershipTransferred0Iterator) Close ¶
func (it *OwnershipFacetOwnershipTransferred0Iterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*OwnershipFacetOwnershipTransferred0Iterator) Error ¶
func (it *OwnershipFacetOwnershipTransferred0Iterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*OwnershipFacetOwnershipTransferred0Iterator) Next ¶
func (it *OwnershipFacetOwnershipTransferred0Iterator) 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 OwnershipFacetOwnershipTransferredIterator ¶
type OwnershipFacetOwnershipTransferredIterator struct { Event *OwnershipFacetOwnershipTransferred // Event containing the contract specifics and raw log // contains filtered or unexported fields }
OwnershipFacetOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the OwnershipFacet contract.
func (*OwnershipFacetOwnershipTransferredIterator) Close ¶
func (it *OwnershipFacetOwnershipTransferredIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*OwnershipFacetOwnershipTransferredIterator) Error ¶
func (it *OwnershipFacetOwnershipTransferredIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*OwnershipFacetOwnershipTransferredIterator) Next ¶
func (it *OwnershipFacetOwnershipTransferredIterator) 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 OwnershipFacetRaw ¶
type OwnershipFacetRaw struct {
Contract *OwnershipFacet // Generic contract binding to access the raw methods on
}
OwnershipFacetRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*OwnershipFacetRaw) Call ¶
func (_OwnershipFacet *OwnershipFacetRaw) 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 (*OwnershipFacetRaw) Transact ¶
func (_OwnershipFacet *OwnershipFacetRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*OwnershipFacetRaw) Transfer ¶
func (_OwnershipFacet *OwnershipFacetRaw) 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 OwnershipFacetSession ¶
type OwnershipFacetSession struct { Contract *OwnershipFacet // 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 }
OwnershipFacetSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*OwnershipFacetSession) Owner ¶
func (_OwnershipFacet *OwnershipFacetSession) Owner() (common.Address, error)
Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
Solidity: function owner() view returns(address owner_)
func (*OwnershipFacetSession) TransferOwnership ¶
func (_OwnershipFacet *OwnershipFacetSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error)
TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
Solidity: function transferOwnership(address _newOwner) returns()
type OwnershipFacetTransactor ¶
type OwnershipFacetTransactor struct {
// contains filtered or unexported fields
}
OwnershipFacetTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewOwnershipFacetTransactor ¶
func NewOwnershipFacetTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnershipFacetTransactor, error)
NewOwnershipFacetTransactor creates a new write-only instance of OwnershipFacet, bound to a specific deployed contract.
func (*OwnershipFacetTransactor) TransferOwnership ¶
func (_OwnershipFacet *OwnershipFacetTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error)
TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
Solidity: function transferOwnership(address _newOwner) returns()
type OwnershipFacetTransactorRaw ¶
type OwnershipFacetTransactorRaw struct {
Contract *OwnershipFacetTransactor // Generic write-only contract binding to access the raw methods on
}
OwnershipFacetTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*OwnershipFacetTransactorRaw) Transact ¶
func (_OwnershipFacet *OwnershipFacetTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*OwnershipFacetTransactorRaw) Transfer ¶
func (_OwnershipFacet *OwnershipFacetTransactorRaw) 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 OwnershipFacetTransactorSession ¶
type OwnershipFacetTransactorSession struct { Contract *OwnershipFacetTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
OwnershipFacetTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*OwnershipFacetTransactorSession) TransferOwnership ¶
func (_OwnershipFacet *OwnershipFacetTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error)
TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
Solidity: function transferOwnership(address _newOwner) 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