Documentation
¶
Index ¶
- Constants
- Variables
- type BlockID
- type Class
- type Declare
- type Deploy
- type DeployAccount
- type DeployedContract
- type EntrypointsByType
- type Error
- type Event
- type Felt
- type Handler
- type Invoke
- type KeyValue
- type L1Handler
- type Message
- type Nonce
- type StateDiff
- type StateUpdate
- type StorageDiff
- type Transaction
- type TransactionType
- type Uint256
Constants ¶
View Source
const ( Latest = "latest" Pending = "pending" )
default block string names
View Source
const ( Version0 = "0x0" Version1 = "0x1" Version2 = "0x2" )
versions
View Source
const ( CallTypeCall = "CALL" CallTypeDelegate = "DELEGATE" )
call types
View Source
const ( EntrypointTypeExternal = "EXTERNAL" EntrypointTypeConstructor = "CONSTRUCTOR" EntrypointTypeL1Handler = "L1_HANDLER" )
entrypoint types
View Source
const ( StatusNotReceived = "NOT_RECEIVED" StatusReceived = "RECEIVED" StatusPending = "PENDING" StatusRejected = "REJECTED" StatusAcceptedOnL2 = "ACCEPTED_ON_L2" StatusAcceptedOnL1 = "ACCEPTED_ON_L1" )
statuses
View Source
const ( TransactionTypeInvoke = "INVOKE" TransactionTypeInvokeFunction = "INVOKE_FUNCTION" TransactionTypeDeclare = "DECLARE" TransactionTypeDeploy = "DEPLOY" TransactionTypeDeployAccount = "DEPLOY_ACCOUNT" TransactionTypeL1Handler = "L1_HANDLER" )
View Source
const (
AddressBytesLength = 32
)
length
View Source
const DefaultJSONRPC = "2.0"
Variables ¶
View Source
var ( ErrInvalidBlockFilter = errors.New("Only one field of Hash, Number or String in BlockFilter should be set") ErrEmptyBlockFilter = errors.New("empty BlockFilter") )
errors
Functions ¶
This section is empty.
Types ¶
type Class ¶
type Class struct { EntryPointsByType EntrypointsByType `json:"entry_points_by_type"` Abi abi.Abi `json:"-"` RawAbi stdJSON.RawMessage `json:"abi"` }
Class -
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"` }
Declare -
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"` }
DeployAccount -
type DeployedContract ¶
DeployedContract -
type EntrypointsByType ¶
type EntrypointsByType struct { CONSTRUCTOR []Handler `json:"CONSTRUCTOR"` EXTERNAL []Handler `json:"EXTERNAL"` L1HANDLER []Handler `json:"L1_HANDLER"` }
EntrypointsByType -
type Error ¶
type Error struct { Code int64 `json:"code"` Message string `json:"message"` Data stdJSON.RawMessage `json:"data"` }
Error -
type Event ¶
type Event struct { Order uint64 `json:"order"` FromAddress string `json:"from_address"` Keys []string `json:"keys"` Data []string `json:"data"` BlockHash string `json:"block_hash"` BlockNumber uint64 `json:"block_number"` TransactionHash string `json:"transaction_hash"` }
Event -
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"` Signature []string `json:"signature"` Calldata []string `json:"calldata"` }
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 []string `json:"payload"` Nonce Felt `json:"nonce"` }
Message -
type StateDiff ¶
type StateDiff struct { StorageDiffs map[Felt][]KeyValue `json:"storage_diffs"` DeclaredContracts []Felt `json:"declared_contracts"` DeployedContracts []DeployedContract `json:"deployed_contracts"` Nonces map[Felt]Felt `json:"nonces"` }
StateDiff -
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 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 ¶
type Uint256 struct {
// contains filtered or unexported fields
}
Uint256 -
func NewUint256FromString ¶
NewUint256FromString -
func NewUint256FromStrings ¶
NewUint256FromStrings -
Click to show internal directories.
Click to hide internal directories.