Documentation ¶
Index ¶
- Constants
- Variables
- type BlockID
- type Class
- type DAMode
- func (x DAMode) IsValid() bool
- func (x DAMode) MarshalText() ([]byte, error)
- func (x *DAMode) Scan(value interface{}) (err error)
- func (x DAMode) String() string
- func (x *DAMode) UnmarshalJSON(text []byte) error
- func (x *DAMode) UnmarshalText(text []byte) error
- func (x DAMode) Value() (driver.Value, error)
- type Declare
- type DeclaredClass
- type Deploy
- type DeployAccount
- type DeployedContract
- type EntrypointsByType
- type Event
- type Felt
- type Handler
- type Invoke
- type KeyValue
- type L1Handler
- type Message
- type Nonce
- type ReplacedClass
- type ReplacedClassRpc
- type ResourceBound
- type ResourceBounds
- type StateDiff
- type StateDiffRpc
- type StateUpdate
- type StateUpdateRpc
- type StorageDiff
- type Transaction
- type TransactionType
- type Uint256
Constants ¶
const ( Latest = "latest" Pending = "pending" )
default block string names
const ( Version0 = "0x0" Version1 = "0x1" Version2 = "0x2" Version3 = "0x3" )
versions
const ( CallTypeCall = "CALL" CallTypeDelegate = "DELEGATE" )
call types
const ( EntrypointTypeExternal = "EXTERNAL" EntrypointTypeConstructor = "CONSTRUCTOR" EntrypointTypeL1Handler = "L1_HANDLER" )
entrypoint types
const ( StatusNotReceived = "NOT_RECEIVED" StatusReceived = "RECEIVED" StatusPending = "PENDING" StatusRejected = "REJECTED" StatusAcceptedOnL2 = "ACCEPTED_ON_L2" StatusAcceptedOnL1 = "ACCEPTED_ON_L1" StatusReverted = "REVERTED" )
statuses
const ( TransactionTypeInvoke = "INVOKE" TransactionTypeInvokeFunction = "INVOKE_FUNCTION" TransactionTypeDeclare = "DECLARE" TransactionTypeDeploy = "DEPLOY" TransactionTypeDeployAccount = "DEPLOY_ACCOUNT" TransactionTypeL1Handler = "L1_HANDLER" )
const (
AddressBytesLength = 32
)
length
const DefaultJSONRPC = "2.0"
Variables ¶
var ( ErrInvalidBlockFilter = errors.New("Only one field of Hash, Number or String in BlockFilter should be set") ErrEmptyBlockFilter = errors.New("empty BlockFilter") )
errors
var ErrInvalidDAMode = errors.New("not a valid DAMode")
Functions ¶
This section is empty.
Types ¶
type Class ¶
type Class struct { EntryPointsByType EntrypointsByType `json:"entry_points_by_type"` ClassVersion string `json:"contract_class_version"` Abi abi.Abi `json:"-"` RawAbi stdJSON.RawMessage `json:"abi"` }
Class -
type DAMode ¶
type DAMode string
swagger:enum DAMode
ENUM( L1, L2 )
func DAModeValues ¶
func DAModeValues() []DAMode
DAModeValues returns a list of the values for DAMode
func ParseDAMode ¶
ParseDAMode attempts to convert a string to a DAMode.
func (DAMode) IsValid ¶
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (DAMode) MarshalText ¶
MarshalText implements the text marshaller method.
func (*DAMode) UnmarshalJSON ¶
func (*DAMode) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type Declare ¶
type Declare struct { MaxFee Felt `json:"max_fee"` Nonce Felt `json:"nonce"` SenderAddress Felt `json:"sender_address"` ContractAddress Felt `json:"contract_address"` Signature []string `json:"signature"` ContractClass *Class `json:"contract_class,omitempty"` ClassHash Felt `json:"class_hash,omitempty"` CompiledClassHash Felt `json:"compiled_class_hash,omitempty"` AccountDeploymentData []Felt `json:"account_deployment_data"` ChainId Felt `json:"chain_id"` FeeDataAvailabilityMode DAMode `json:"fee_data_availability_mode"` NonceDataAvailabilityMode DAMode `json:"nonce_data_availability_mode"` PayMasterData []Felt `json:"paymaster_data"` Tip Felt `json:"tip"` }
Declare -
type DeclaredClass ¶
type DeclaredClass struct { ClassHash Felt `json:"class_hash"` CompiledClassHash Felt `json:"compiled_class_hash"` }
DeclaredClass -
type Deploy ¶
type Deploy struct { ContractAddressSalt string `json:"contract_address_salt"` ConstructorCalldata []string `json:"constructor_calldata"` ClassHash Felt `json:"class_hash,omitempty"` ContractClass Class `json:"contract_class,omitempty"` ContractAddress Felt `json:"contract_address"` }
Deploy -
type DeployAccount ¶
type DeployAccount struct { MaxFee Felt `json:"max_fee"` Nonce Felt `json:"nonce"` ContractAddress Felt `json:"contract_address"` ContractAddressSalt string `json:"contract_address_salt"` ClassHash Felt `json:"class_hash"` ConstructorCalldata []string `json:"constructor_calldata"` Signature []string `json:"signature"` ChainId Felt `json:"chain_id"` FeeDataAvailabilityMode DAMode `json:"fee_data_availability_mode"` NonceDataAvailabilityMode DAMode `json:"nonce_data_availability_mode"` PayMasterData []Felt `json:"paymaster_data"` Tip Felt `json:"tip"` }
DeployAccount -
type DeployedContract ¶
DeployedContract -
type EntrypointsByType ¶
type EntrypointsByType struct { CONSTRUCTOR []Handler `json:"CONSTRUCTOR"` EXTERNAL []Handler `json:"EXTERNAL"` L1HANDLER []Handler `json:"L1_HANDLER"` }
EntrypointsByType -
type Event ¶
type Event struct { Order uint64 `json:"order"` FromAddress string `json:"from_address"` Keys []Felt `json:"keys"` Data []Felt `json:"data"` }
Event -
type Handler ¶
type Handler struct { Offset uint64 `json:"-"` FunctionIdx uint64 `json:"function_idx,omitempty"` Selector string `json:"selector"` }
Handler -
type Invoke ¶
type Invoke struct { MaxFee Felt `json:"max_fee"` Nonce Felt `json:"nonce"` ContractAddress Felt `json:"contract_address"` EntrypointSelector Felt `json:"entry_point_selector"` SenderAddress Felt `json:"sender_address"` ChainId Felt `json:"chain_id"` FeeDataAvailabilityMode DAMode `json:"fee_data_availability_mode"` NonceDataAvailabilityMode DAMode `json:"nonce_data_availability_mode"` ResourceBounds *ResourceBounds `json:"resource_bounds,omitempty"` Tip Felt `json:"tip"` Signature []string `json:"signature"` Calldata []string `json:"calldata"` AccountDeploymentData []Felt `json:"account_deployment_data"` PayMasterData []Felt `json:"paymaster_data"` }
Invoke -
type L1Handler ¶
type L1Handler struct { Nonce Felt `json:"nonce"` ContractAddress Felt `json:"contract_address"` EntrypointSelector Felt `json:"entry_point_selector"` Calldata []string `json:"calldata"` }
L1Handler -
type Message ¶
type Message struct { Order uint64 `json:"order"` FromAddress string `json:"from_address"` ToAddress string `json:"to_address"` Selector Felt `json:"selector"` Payload []Felt `json:"payload"` Nonce Felt `json:"nonce"` }
Message -
type ReplacedClass ¶
type ReplacedClassRpc ¶
type ResourceBound ¶
type ResourceBounds ¶
type ResourceBounds struct { L1Gas ResourceBound `json:"L1_GAS"` L2Gas ResourceBound `json:"L2_GAS"` }
type StateDiff ¶
type StateDiff struct { StorageDiffs map[Felt][]KeyValue `json:"storage_diffs"` DeclaredClasses []DeclaredClass `json:"declared_classes"` ReplacedClasses []ReplacedClass `json:"replaced_classes"` OldDeclaredContracts []Felt `json:"old_declared_contracts"` DeployedContracts []DeployedContract `json:"deployed_contracts"` Nonces map[Felt]Felt `json:"nonces"` }
StateDiff -
type StateDiffRpc ¶
type StateDiffRpc struct { DeclaredClasses []DeclaredClass `json:"declared_classes"` DeprecatedDeclaredClasses []Felt `json:"deprecated_declared_classes"` ReplacedClasses []ReplacedClassRpc `json:"replaced_classes"` DeclaredContractHashes []Felt `json:"declared_contract_hashes"` DeployedContracts []DeployedContract `json:"deployed_contracts"` Nonces []Nonce `json:"nonces"` StorageDiffs []StorageDiff `json:"storage_diffs"` }
StateDiffRpc -
type StateUpdate ¶
type StateUpdate struct { BlockHash Felt `json:"block_hash"` NewRoot Felt `json:"new_root"` OldRoot Felt `json:"old_root"` StateDiff StateDiff `json:"state_diff"` }
StateUpdate -
type StateUpdateRpc ¶
type StateUpdateRpc struct { BlockHash Felt `json:"block_hash"` NewRoot Felt `json:"new_root"` OldRoot Felt `json:"old_root"` StateDiff StateDiffRpc `json:"state_diff"` }
StateUpdateRpc -
func (StateUpdateRpc) ToStateUpdate ¶
func (sur StateUpdateRpc) ToStateUpdate() StateUpdate
ToStateUpdate -
type StorageDiff ¶
type StorageDiff struct { Address Felt `json:"address"` StorageEntries []KeyValue `json:"storage_entries"` }
StorageDiff -
type Transaction ¶
type Transaction struct { Type string `json:"type"` Version Felt `json:"version"` TransactionHash Felt `json:"transaction_hash,omitempty"` Body any `json:"-"` }
Transaction -
func (*Transaction) UnmarshalJSON ¶
func (t *Transaction) UnmarshalJSON(raw []byte) error
UnmarshalJSON -
type Uint256 ¶
Uint256 -
func NewUint256FromString ¶
NewUint256FromString -
func NewUint256FromStrings ¶
NewUint256FromStrings -