Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContractAddressParams ¶
type ContractAddressParams struct {
// contains filtered or unexported fields
}
type SmartAccountProvider ¶
type SmartAccountProvider struct { Client *ethclient.Client // Ethereum client for interacting with the blockchain Owner common.Address // Ethereum address of the owner SAFactory *factory.Factory // Smart account factory contract instance EntryPoint *entrypoint.EntryPoint // Smart account factory contract instance PrivateKey string // The private key of the Ethereum account Contracts *ContractAddressParams // The object that contains all the contract addresses }
SmartAccountProvider is a struct that manages interaction with Ethereum smart contracts.
func NewSmartAccountProvider ¶
func NewSmartAccountProvider(params SmartAccountProviderParams) (*SmartAccountProvider, error)
NewSmartAccountProvider creates a new instance of SmartAccountProvider with the provided parameters. It initializes the Ethereum client, owner's address, and the smart account factory contract.
func (*SmartAccountProvider) GetSmartAccountAddress ¶
func (sap *SmartAccountProvider) GetSmartAccountAddress(salt int64) (common.Address, error)
GetSmartAccountAddress retrieves the address of a smart account based on a given salt value.
func (*SmartAccountProvider) SendUserOpsTransaction ¶
func (sap *SmartAccountProvider) SendUserOpsTransaction(target TargetParams) (any, error)
type SmartAccountProviderParams ¶
type SmartAccountProviderParams struct { OwnerPrivateKey string // The private key of the Ethereum account RPC string // The RPC endpoint for the Ethereum node EntryPointAddress string // The address of the entry point contract SmartAccountFactoryAddress string // The address of the smart account factory contract }
SmartAccountProviderParams stores the parameters required to initialize the SmartAccountProvider.
type TargetParams ¶
type UOps ¶
type UOps struct { Sender common.Address `json:"sender"` Nonce string `json:"nonce"` InitCode string `json:"initCode"` CallData string `json:"callData"` Signature *common.Hash `json:"signature,omitempty"` CallGasLimit string `json:"callGasLimit"` VerificationGasLimit string `json:"verificationGasLimit"` PreVerificationGas string `json:"preVerificationGas"` MaxFeePerGas string `json:"maxFeePerGas"` MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas"` PaymasterAndData string `json:"paymasterAndData"` }
Click to show internal directories.
Click to hide internal directories.