View Source StarkNet.Provider (StarkNet v0.2.0)
The provider is used to build requests to the StarkNet gateways.
Link to this section Summary
Types
Represents a block identifier, either the block number, the block hash, :latest
, or :pending
.
Provider call options.
Functions
Returns a request to get the latest block.
Returns a request to fetch a specific block.
Returns a request to perform a call operation on the given contract.
Returns a request to fetch the code for the contract at contract_address
.
Returns a request to get the smart contracts addresses on the settlement layer.
Returns a request to fetch the contracts' storage at the given key
location.
Returns a request to get the given transaction.
Returns a request to get the given transaction receipt.
Returns a request to get the given transaction status.
Link to this section Types
Specs
block_id() :: pos_integer() | String.t() | :latest | :pending
Represents a block identifier, either the block number, the block hash, :latest
, or :pending
.
Specs
options() :: {:block, block_id()}
Provider call options.
Link to this section Functions
Specs
block() :: StarkNet.Request.t()
Returns a request to get the latest block.
Specs
block(block_id()) :: StarkNet.Request.t()
Returns a request to fetch a specific block.
Specs
call(String.t(), String.t(), [String.t()], [options()]) :: StarkNet.Request.t()
Returns a request to perform a call operation on the given contract.
Specs
code(String.t(), [options()]) :: StarkNet.Request.t()
Returns a request to fetch the code for the contract at contract_address
.
Specs
contract_address() :: StarkNet.Request.t()
Returns a request to get the smart contracts addresses on the settlement layer.
Specs
storage_at(String.t(), String.t(), [options()]) :: StarkNet.Request.t()
Returns a request to fetch the contracts' storage at the given key
location.
Specs
transaction(String.t()) :: StarkNet.Request.t()
Returns a request to get the given transaction.
Specs
transaction_receipt(String.t()) :: StarkNet.Request.t()
Returns a request to get the given transaction receipt.
Specs
transaction_status(String.t()) :: StarkNet.Request.t()
Returns a request to get the given transaction status.