TerminusInitializer

package
v0.0.0-...-e60cbf4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 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 TERMINUS_INITIALIZER_RPC_URL environment variable")
View Source
var TerminusInitializerABI = TerminusInitializerMetaData.ABI

TerminusInitializerABI is the input ABI used to generate the binding from. Deprecated: Use TerminusInitializerMetaData.ABI instead.

View Source
var TerminusInitializerBin = TerminusInitializerMetaData.Bin

TerminusInitializerBin is the compiled bytecode used for deploying new contracts. Deprecated: Use TerminusInitializerMetaData.Bin instead.

View Source
var TerminusInitializerMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
	Bin: "0x6080604052348015600f57600080fd5b506102538061001f6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e1c7392a14610030575b600080fd5b61003861003a565b005b61004261014e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f6020527f845f7f8d885943dffdc1524acbd9538b2923f93aad26d306df3b8982c7f0632d805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091821681179092557f0e89341c000000000000000000000000000000000000000000000000000000006000527fcda23395996795f7b8155822fcc6171125c877448c68566f10ccabd60b06eb27805490911690911790557ffa8518a280120fdfaeca1e01615627dc31290bf234dcd1969ba07a186c72dd1080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff16331461021b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f6572000000000000000000000000000000000000000000000000000000000000606482015260840160405180910390fd5b56fea2646970667358221220453a1768f7dd66c2e91328f4f3458697a9a3e4a18261cea631cc377f459601fa64736f6c634300081c0033",
}

Functions

func CalculateSafeTxHash

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

func CreateInitCommand

func CreateInitCommand() *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 CreateTerminusInitializerCommand

func CreateTerminusInitializerCommand() *cobra.Command

func CreateTerminusInitializerDeploymentCommand

func CreateTerminusInitializerDeploymentCommand() *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 TERMINUS_INITIALIZER_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 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

type TerminusInitializer

type TerminusInitializer struct {
	TerminusInitializerCaller     // Read-only binding to the contract
	TerminusInitializerTransactor // Write-only binding to the contract
	TerminusInitializerFilterer   // Log filterer for contract events
}

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

func DeployTerminusInitializer

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

DeployTerminusInitializer deploys a new Ethereum contract, binding an instance of TerminusInitializer to it.

func NewTerminusInitializer

func NewTerminusInitializer(address common.Address, backend bind.ContractBackend) (*TerminusInitializer, error)

NewTerminusInitializer creates a new instance of TerminusInitializer, bound to a specific deployed contract.

type TerminusInitializerCaller

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

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

func NewTerminusInitializerCaller

func NewTerminusInitializerCaller(address common.Address, caller bind.ContractCaller) (*TerminusInitializerCaller, error)

NewTerminusInitializerCaller creates a new read-only instance of TerminusInitializer, bound to a specific deployed contract.

type TerminusInitializerCallerRaw

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

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

func (*TerminusInitializerCallerRaw) Call

func (_TerminusInitializer *TerminusInitializerCallerRaw) 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 TerminusInitializerCallerSession

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

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

type TerminusInitializerFilterer

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

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

func NewTerminusInitializerFilterer

func NewTerminusInitializerFilterer(address common.Address, filterer bind.ContractFilterer) (*TerminusInitializerFilterer, error)

NewTerminusInitializerFilterer creates a new log filterer instance of TerminusInitializer, bound to a specific deployed contract.

type TerminusInitializerRaw

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

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

func (*TerminusInitializerRaw) Call

func (_TerminusInitializer *TerminusInitializerRaw) 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 (*TerminusInitializerRaw) Transact

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

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

func (*TerminusInitializerRaw) Transfer

func (_TerminusInitializer *TerminusInitializerRaw) 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 TerminusInitializerSession

type TerminusInitializerSession struct {
	Contract     *TerminusInitializer // 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
}

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

func (*TerminusInitializerSession) Init

func (_TerminusInitializer *TerminusInitializerSession) Init() (*types.Transaction, error)

Init is a paid mutator transaction binding the contract method 0xe1c7392a.

Solidity: function init() returns()

type TerminusInitializerTransactor

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

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

func NewTerminusInitializerTransactor

func NewTerminusInitializerTransactor(address common.Address, transactor bind.ContractTransactor) (*TerminusInitializerTransactor, error)

NewTerminusInitializerTransactor creates a new write-only instance of TerminusInitializer, bound to a specific deployed contract.

func (*TerminusInitializerTransactor) Init

func (_TerminusInitializer *TerminusInitializerTransactor) Init(opts *bind.TransactOpts) (*types.Transaction, error)

Init is a paid mutator transaction binding the contract method 0xe1c7392a.

Solidity: function init() returns()

type TerminusInitializerTransactorRaw

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

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

func (*TerminusInitializerTransactorRaw) Transact

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

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

func (*TerminusInitializerTransactorRaw) Transfer

func (_TerminusInitializer *TerminusInitializerTransactorRaw) 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 TerminusInitializerTransactorSession

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

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

func (*TerminusInitializerTransactorSession) Init

func (_TerminusInitializer *TerminusInitializerTransactorSession) Init() (*types.Transaction, error)

Init is a paid mutator transaction binding the contract method 0xe1c7392a.

Solidity: function init() returns()

Jump to

Keyboard shortcuts

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