abiutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const TestABI = `` /* 3934-byte string literal not displayed */

Variables

View Source
var Subjectstring = `` /* 1774-byte string literal not displayed */

Functions

func AppendToSlice

func AppendToSlice(slice interface{}, value interface{}) (interface{}, error)

func CloneStruct

func CloneStruct(input interface{}) (interface{}, error)

CloneStruct clones a struct using reflection

func MakeSliceOfType

func MakeSliceOfType(solType abi.Type, length, cap int) interface{}

func ParseABIFromString

func ParseABIFromString(abistr string) (ABI *abi.ABI, clearABIString string, err error)

func Sanitize

func Sanitize(abi string, l int) string

func SetSliceValue

func SetSliceValue(slice interface{}, index int, value interface{}) error

func SetTupleValues

func SetTupleValues(tuple *abi.Argument, values []interface{}) (interface{}, error)

Types

type ABIStruct

type ABIStruct struct {
	Compiler struct {
		Version string `json:"version"`
	} `json:"compiler"`
	Language string `json:"language"`
	Output   struct {
		Abi json.RawMessage `json:"abi"`
	} `json:"output"`
	/*
		Settings struct {
			CompilationTarget struct {
				ContractsContractsSamplesSimpleAccountSol string `json:"contracts/contracts/samples/SimpleAccount.sol"`
			} `json:"compilationTarget"`
			EvmVersion string `json:"evmVersion"`
			Libraries  struct {
			} `json:"libraries"`
			Metadata struct {
				BytecodeHash string `json:"bytecodeHash"`
			} `json:"metadata"`
			Optimizer struct {
				Enabled bool `json:"enabled"`
				Runs    int  `json:"runs"`
			} `json:"optimizer"`
			Remappings []interface{} `json:"remappings"`
		} `json:"settings"`
	*/
	/*
		Sources struct {
			OpenzeppelinContractsInterfacesDraftIERC1822Sol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/interfaces/draft-IERC1822.sol"`
			OpenzeppelinContractsProxyERC1967ERC1967UtilsSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol"`
			OpenzeppelinContractsProxyBeaconIBeaconSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/proxy/beacon/IBeacon.sol"`
			OpenzeppelinContractsProxyUtilsInitializableSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/proxy/utils/Initializable.sol"`
			OpenzeppelinContractsProxyUtilsUUPSUpgradeableSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"`
			OpenzeppelinContractsTokenERC1155IERC1155ReceiverSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"`
			OpenzeppelinContractsTokenERC721IERC721ReceiverSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"`
			OpenzeppelinContractsUtilsAddressSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/utils/Address.sol"`
			OpenzeppelinContractsUtilsStorageSlotSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/utils/StorageSlot.sol"`
			OpenzeppelinContractsUtilsStringsSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/utils/Strings.sol"`
			OpenzeppelinContractsUtilsCryptographyECDSASol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/utils/cryptography/ECDSA.sol"`
			OpenzeppelinContractsUtilsCryptographyMessageHashUtilsSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"`
			OpenzeppelinContractsUtilsIntrospectionIERC165Sol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/utils/introspection/IERC165.sol"`
			OpenzeppelinContractsUtilsMathMathSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"@openzeppelin/contracts/utils/math/Math.sol"`
			ContractsContractsCoreBaseAccountSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/core/BaseAccount.sol"`
			ContractsContractsCoreHelpersSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/core/Helpers.sol"`
			ContractsContractsCoreUserOperationLibSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/core/UserOperationLib.sol"`
			ContractsContractsInterfacesIAccountSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/interfaces/IAccount.sol"`
			ContractsContractsInterfacesIAggregatorSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/interfaces/IAggregator.sol"`
			ContractsContractsInterfacesIEntryPointSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/interfaces/IEntryPoint.sol"`
			ContractsContractsInterfacesINonceManagerSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/interfaces/INonceManager.sol"`
			ContractsContractsInterfacesIStakeManagerSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/interfaces/IStakeManager.sol"`
			ContractsContractsInterfacesPackedUserOperationSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/interfaces/PackedUserOperation.sol"`
			ContractsContractsSamplesSimpleAccountSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/samples/SimpleAccount.sol"`
			ContractsContractsSamplesCallbackTokenCallbackHandlerSol struct {
				Keccak256 string   `json:"keccak256"`
				License   string   `json:"license"`
				Urls      []string `json:"urls"`
			} `json:"contracts/contracts/samples/callback/TokenCallbackHandler.sol"`
		} `json:"sources"`
	*/
	Version int `json:"version"`
}

type UserOperationV6 added in v0.2.0

type UserOperationV6 struct {
	Sender               common.Address `json:"sender"`
	Nonce                *big.Int       `json:"nonce"`
	InitCode             []byte         `json:"initCode"`
	CallData             []byte         `json:"callData"`
	CallGasLimit         *big.Int       `json:"callGasLimit"`
	VerificationGasLimit *big.Int       `json:"verificationGasLimit"`
	PreVerificationGas   *big.Int       `json:"preVerificationGas"`
	MaxFeePerGas         *big.Int       `json:"maxFeePerGas"`
	MaxPriorityFeePerGas *big.Int       `json:"maxPriorityFeePerGas"`
	PaymasterAndData     []byte         `json:"paymasterAndData"`
	Signature            []byte         `json:"signature"`
}

Jump to

Keyboard shortcuts

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