openzeppelin_utils
Fully qualified path: openzeppelin_utils
Modules
Free functions
Re-exports:
Modules
Modules
cryptography
Fully qualified path: openzeppelin_utils::cryptography
Modules
Modules
Modules
interface
Fully qualified path: openzeppelin_utils::cryptography::interface
Modules
Traits
Groups:
dispatchers
Modules
Modules
__external_INoncesForwardImpl
Fully qualified path: openzeppelin_utils::cryptography::interface::__external_INoncesForwardImpl
__l1_handler_INoncesForwardImpl
Fully qualified path: openzeppelin_utils::cryptography::interface::__l1_handler_INoncesForwardImpl
__constructor_INoncesForwardImpl
Fully qualified path: openzeppelin_utils::cryptography::interface::__constructor_INoncesForwardImpl
Traits
Traits
INonces
Fully qualified path: openzeppelin_utils::cryptography::interface::INonces
pub trait INonces<TState>
Trait functions
nonces
Fully qualified path: openzeppelin_utils::cryptography::interface::INonces::nonces
fn nonces(self: @TState, owner: ContractAddress) -> felt252
UnsafeNewContractStateTraitForINoncesForwardImpl
Fully qualified path: openzeppelin_utils::cryptography::interface::UnsafeNewContractStateTraitForINoncesForwardImpl
pub trait UnsafeNewContractStateTraitForINoncesForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: openzeppelin_utils::cryptography::interface::UnsafeNewContractStateTraitForINoncesForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
nonces
Fully qualified path: openzeppelin_utils::cryptography::nonces
Modules
Modules
Modules
NoncesComponent
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent
Modules
Free functions
Structs
Enums
Traits
Modules
Modules
Errors
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::Errors
Constants
Constants
Constants
INVALID_NONCE
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::Errors::INVALID_NONCE
pub const INVALID_NONCE: felt252 = 114633287427981701509025378867516584301826866570085;
__external_NoncesImpl
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::__external_NoncesImpl
__l1_handler_NoncesImpl
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::__l1_handler_NoncesImpl
__constructor_NoncesImpl
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::__constructor_NoncesImpl
Free functions
Free functions
unsafe_new_component_state
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::unsafe_new_component_state
pub fn unsafe_new_component_state<TContractState>() -> ComponentState<TContractState>
Structs
Structs
Storage
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::Storage
[phantom]
pub struct Storage {
pub Nonces_nonces: Map<ContractAddress, felt252>,
}
Members
Nonces_nonces
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::Storage::Nonces_nonces
pub Nonces_nonces: Map<ContractAddress, felt252>
ComponentState
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::ComponentState
pub struct ComponentState<TContractState> {}
Enums
Enums
Event
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::Event
pub enum Event {}
Traits
Traits
HasComponent
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::HasComponent
pub trait HasComponent<TContractState>
Trait functions
get_component
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::HasComponent::get_component
fn get_component(self: @TContractState) -> @ComponentState<TContractState>
get_component_mut
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::HasComponent::get_component_mut
fn get_component_mut(ref self: TContractState) -> ComponentState<TContractState>
get_contract
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::HasComponent::get_contract
fn get_contract(self: @ComponentState<TContractState>) -> @TContractState
get_contract_mut
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::HasComponent::get_contract_mut
fn get_contract_mut(ref self: ComponentState<TContractState>) -> TContractState
emit
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::HasComponent::emit
fn emit<S, impl IntoImp: Into<S, openzeppelin_utils::cryptography::nonces::NoncesComponent::Event>>(
ref self: ComponentState<TContractState>, event: S,
)
InternalTrait
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::InternalTrait
pub trait InternalTrait<TContractState, +HasComponent<TContractState>>
Trait functions
use_nonce
Consumes a nonce, returns the current value, and increments nonce.
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::InternalTrait::use_nonce
fn use_nonce(ref self: ComponentState<TContractState>, owner: ContractAddress) -> felt252
use_checked_nonce
Same as use_nonce but checking that nonce is the next valid one for owner.
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::InternalTrait::use_checked_nonce
fn use_checked_nonce(
ref self: ComponentState<TContractState>, owner: ContractAddress, nonce: felt252,
) -> felt252
UnsafeNewContractStateTraitForNoncesImpl
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::UnsafeNewContractStateTraitForNoncesImpl
pub trait UnsafeNewContractStateTraitForNoncesImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: openzeppelin_utils::cryptography::nonces::NoncesComponent::UnsafeNewContractStateTraitForNoncesImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
snip12
Fully qualified path: openzeppelin_utils::cryptography::snip12
Constants
Structs
Traits
Constants
Constants
STARKNET_DOMAIN_TYPE_HASH
Fully qualified path: openzeppelin_utils::cryptography::snip12::STARKNET_DOMAIN_TYPE_HASH
pub const STARKNET_DOMAIN_TYPE_HASH: felt252 =
903185825206485993942627316682662375025985481915563849197465435174148809232;
Structs
Structs
StarknetDomain
Fully qualified path: openzeppelin_utils::cryptography::snip12::StarknetDomain
[derive(Drop, Copy, Hash)]
pub struct StarknetDomain {
pub name: felt252,
pub version: felt252,
pub chain_id: felt252,
pub revision: felt252,
}
Members
name
Fully qualified path: openzeppelin_utils::cryptography::snip12::StarknetDomain::name
pub name: felt252
version
Fully qualified path: openzeppelin_utils::cryptography::snip12::StarknetDomain::version
pub version: felt252
chain_id
Fully qualified path: openzeppelin_utils::cryptography::snip12::StarknetDomain::chain_id
pub chain_id: felt252
revision
Fully qualified path: openzeppelin_utils::cryptography::snip12::StarknetDomain::revision
pub revision: felt252
Traits
Traits
StructHash
Fully qualified path: openzeppelin_utils::cryptography::snip12::StructHash
pub trait StructHash<T>
Trait functions
hash_struct
Fully qualified path: openzeppelin_utils::cryptography::snip12::StructHash::hash_struct
fn hash_struct(self: @T) -> felt252
OffchainMessageHash
Fully qualified path: openzeppelin_utils::cryptography::snip12::OffchainMessageHash
pub trait OffchainMessageHash<T>
Trait functions
get_message_hash
Fully qualified path: openzeppelin_utils::cryptography::snip12::OffchainMessageHash::get_message_hash
fn get_message_hash(self: @T, signer: ContractAddress) -> felt252
SNIP12Metadata
Fully qualified path: openzeppelin_utils::cryptography::snip12::SNIP12Metadata
pub trait SNIP12Metadata
Trait functions
name
Returns the name of the dapp.
Fully qualified path: openzeppelin_utils::cryptography::snip12::SNIP12Metadata::name
fn name() -> felt252
version
Returns the version of the dapp.
Fully qualified path: openzeppelin_utils::cryptography::snip12::SNIP12Metadata::version
fn version() -> felt252
deployments
Fully qualified path: openzeppelin_utils::deployments
Modules
Constants
Free functions
| calculate_contract_address_from_deploy_syscall | Returns the contract address from a deploy_syscall . deployer_address should be the zero address if the deployment is origin-independent (deployed from zero). For more information, see… |
| calculate_contract_address_from_udc | Returns the calculated contract address for contracts deployed through the UDC. Origin-independent deployments (deployed from zero) should pass Option::None as deployer_info . |
Structs
Modules
Modules
interface
Fully qualified path: openzeppelin_utils::deployments::interface
Modules
| __external_IUniversalDeployerForwardImpl | — |
| __l1_handler_IUniversalDeployerForwardImpl | — |
| __constructor_IUniversalDeployerForwardImpl | — |
Traits
Groups:
dispatchers
| IUniversalDeployerDispatcher | — |
| IUniversalDeployerLibraryDispatcher | — |
| IUniversalDeployerSafeLibraryDispatcher | — |
| IUniversalDeployerSafeDispatcher | — |
Modules
Modules
| __external_IUniversalDeployerForwardImpl | — |
| __l1_handler_IUniversalDeployerForwardImpl | — |
| __constructor_IUniversalDeployerForwardImpl | — |
__external_IUniversalDeployerForwardImpl
Fully qualified path: openzeppelin_utils::deployments::interface::__external_IUniversalDeployerForwardImpl
__l1_handler_IUniversalDeployerForwardImpl
Fully qualified path: openzeppelin_utils::deployments::interface::__l1_handler_IUniversalDeployerForwardImpl
__constructor_IUniversalDeployerForwardImpl
Fully qualified path: openzeppelin_utils::deployments::interface::__constructor_IUniversalDeployerForwardImpl
Traits
Traits
IUniversalDeployer
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployer
pub trait IUniversalDeployer<TState>
Trait functions
deploy_contract
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployer::deploy_contract
fn deploy_contract(
ref self: TState,
class_hash: ClassHash,
salt: felt252,
from_zero: bool,
calldata: Span<felt252>,
) -> ContractAddress
UnsafeNewContractStateTraitForIUniversalDeployerForwardImpl
Fully qualified path: openzeppelin_utils::deployments::interface::UnsafeNewContractStateTraitForIUniversalDeployerForwardImpl
pub trait UnsafeNewContractStateTraitForIUniversalDeployerForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: openzeppelin_utils::deployments::interface::UnsafeNewContractStateTraitForIUniversalDeployerForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
Constants
Constants
L2_ADDRESS_UPPER_BOUND
Fully qualified path: openzeppelin_utils::deployments::L2_ADDRESS_UPPER_BOUND
pub const L2_ADDRESS_UPPER_BOUND: felt252 =
3618502788666131106986593281521497120414687020801267626233049500247285300992;
CONTRACT_ADDRESS_PREFIX
Fully qualified path: openzeppelin_utils::deployments::CONTRACT_ADDRESS_PREFIX
pub const CONTRACT_ADDRESS_PREFIX: felt252 =
523065374597054866729014270389667305596563390979550329787219;
Free functions
Free functions
| calculate_contract_address_from_deploy_syscall | Returns the contract address from a deploy_syscall . deployer_address should be the zero address if the deployment is origin-independent (deployed from zero). For more information, see… |
| calculate_contract_address_from_udc | Returns the calculated contract address for contracts deployed through the UDC. Origin-independent deployments (deployed from zero) should pass Option::None as deployer_info . |
calculate_contract_address_from_deploy_syscall
Returns the contract address from a deploy_syscall.
deployer_address should be the zero address if the deployment is origin-independent (deployed
from zero).
For more information, see
https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/contract-address/
Fully qualified path: openzeppelin_utils::deployments::calculate_contract_address_from_deploy_syscall
pub fn calculate_contract_address_from_deploy_syscall(
salt: felt252,
class_hash: ClassHash,
constructor_calldata: Span<felt252>,
deployer_address: ContractAddress,
) -> ContractAddress
calculate_contract_address_from_udc
Returns the calculated contract address for contracts deployed through the UDC.
Origin-independent deployments (deployed from zero) should pass Option::None as
deployer_info.
Fully qualified path: openzeppelin_utils::deployments::calculate_contract_address_from_udc
pub fn calculate_contract_address_from_udc(
salt: felt252,
class_hash: ClassHash,
constructor_calldata: Span<felt252>,
deployer_info: Option<DeployerInfo>,
) -> ContractAddress
Structs
Structs
DeployerInfo
Fully qualified path: openzeppelin_utils::deployments::DeployerInfo
[derive(Drop)]
pub struct DeployerInfo {
pub caller_address: ContractAddress,
pub udc_address: ContractAddress,
}
Members
caller_address
Fully qualified path: openzeppelin_utils::deployments::DeployerInfo::caller_address
pub caller_address: ContractAddress
udc_address
Fully qualified path: openzeppelin_utils::deployments::DeployerInfo::udc_address
pub udc_address: ContractAddress
interfaces
Fully qualified path: openzeppelin_utils::interfaces
Re-exports:
Groups:
dispatchers
math
Fully qualified path: openzeppelin_utils::math
Free functions
| average | Returns the average of two numbers. The result is rounded down. |
Free functions
Free functions
| average | Returns the average of two numbers. The result is rounded down. |
average
Returns the average of two numbers. The result is rounded down.
Fully qualified path: openzeppelin_utils::math::average
pub fn average<
T,
impl TDrop: Drop<T>,
impl TCopy: Copy<T>,
impl TAdd: Add<T>,
impl TDiv: Div<T>,
impl TBitAnd: BitAnd<T>,
impl TBitXor: BitXor<T>,
impl TInto: Into<core::integer::u8, T>,
>(
a: T, b: T,
) -> T
selectors
Fully qualified path: openzeppelin_utils::selectors
Constants
Constants
Constants
get_role_admin
Fully qualified path: openzeppelin_utils::selectors::get_role_admin
pub const get_role_admin: felt252 =
1362020099646839294595095386844417957430499722265868037749475291537810423586;
getRoleAdmin
Fully qualified path: openzeppelin_utils::selectors::getRoleAdmin
pub const getRoleAdmin: felt252 =
910462217185875474129624545597148273527461046201048665674829677747977138336;
grant_role
Fully qualified path: openzeppelin_utils::selectors::grant_role
pub const grant_role: felt252 =
696465794742374603933803281730432718032369660551303946322441599049217711352;
grantRole
Fully qualified path: openzeppelin_utils::selectors::grantRole
pub const grantRole: felt252 =
1560367495170354764728633504478902402932263081389505108205717909711296447354;
has_role
Fully qualified path: openzeppelin_utils::selectors::has_role
pub const has_role: felt252 =
1366388387368871408391212538559652367856720459146781554727253958102015704427;
hasRole
Fully qualified path: openzeppelin_utils::selectors::hasRole
pub const hasRole: felt252 =
1524480176774572350379373280772296831127278266370645462286311440052160428776;
renounce_role
Fully qualified path: openzeppelin_utils::selectors::renounce_role
pub const renounce_role: felt252 =
381642946473585770820036185024503555343080187113488329245049642671977725251;
renounceRole
Fully qualified path: openzeppelin_utils::selectors::renounceRole
pub const renounceRole: felt252 =
6653341620071310973752352638048746524830698423958043731928584816850528307;
revoke_role
Fully qualified path: openzeppelin_utils::selectors::revoke_role
pub const revoke_role: felt252 =
1028425309240443364614227714606617982815215427817085929123345110828617643756;
revokeRole
Fully qualified path: openzeppelin_utils::selectors::revokeRole
pub const revokeRole: felt252 =
296713603368084158511776663600408199547886832463141828777247169469594393981;
owner
Fully qualified path: openzeppelin_utils::selectors::owner
pub const owner: felt252 =
907111799109225873672206001743429201758838553092777504370151546632448000192;
transfer_ownership
Fully qualified path: openzeppelin_utils::selectors::transfer_ownership
pub const transfer_ownership: felt252 =
1193913221996100586630682738210637098446332112132923139134524553775904843594;
transferOwnership
Fully qualified path: openzeppelin_utils::selectors::transferOwnership
pub const transferOwnership: felt252 =
583453339648053255507186511820051151480363716848694991370856878234313202015;
renounce_ownership
Fully qualified path: openzeppelin_utils::selectors::renounce_ownership
pub const renounce_ownership: felt252 =
9093068627960741026578080905615017765432958716527183167138843608760288861;
renounceOwnership
Fully qualified path: openzeppelin_utils::selectors::renounceOwnership
pub const renounceOwnership: felt252 =
377796347212433105349700972280275487785058939282960306260937738415426830005;
name
Fully qualified path: openzeppelin_utils::selectors::name
pub const name: felt252 =
1528802474226268325865027367859591458315299653151958663884057507666229546336;
symbol
Fully qualified path: openzeppelin_utils::selectors::symbol
pub const symbol: felt252 =
944713526212149105522785400348068751682982210605126537021911324578866405028;
token_uri
Fully qualified path: openzeppelin_utils::selectors::token_uri
pub const token_uri: felt252 =
972963298680412523176499874437857470953299865468167336795334065766985940564;
tokenURI
Fully qualified path: openzeppelin_utils::selectors::tokenURI
pub const tokenURI: felt252 =
527349597080429316600677333550588288293424769527062261567739596074387138637;
balance_of
Fully qualified path: openzeppelin_utils::selectors::balance_of
pub const balance_of: felt252 =
1516754014369808875012295842270199525215452866521012470027807093200784961331;
balanceOf
Fully qualified path: openzeppelin_utils::selectors::balanceOf
pub const balanceOf: felt252 =
1307730684388977109649524593492043083703013045633289330664425380824804018030;
owner_of
Fully qualified path: openzeppelin_utils::selectors::owner_of
pub const owner_of: felt252 =
1507437626807800615315004738637144922697981204057516501649517912180529424988;
ownerOf
Fully qualified path: openzeppelin_utils::selectors::ownerOf
pub const ownerOf: felt252 =
73122117822990066614852869276021392412342625629800410280609241172256672489;
get_approved
Fully qualified path: openzeppelin_utils::selectors::get_approved
pub const get_approved: felt252 =
1372884143127220298872006344483631742615150468767958936494240727074184669001;
getApproved
Fully qualified path: openzeppelin_utils::selectors::getApproved
pub const getApproved: felt252 =
313621473760873935122783910304240840031223477451753145243382550859039628062;
is_approved_for_all
Fully qualified path: openzeppelin_utils::selectors::is_approved_for_all
pub const is_approved_for_all: felt252 =
1205421962903345660045435118044971463613229679762114965449342708481084240093;
isApprovedForAll
Fully qualified path: openzeppelin_utils::selectors::isApprovedForAll
pub const isApprovedForAll: felt252 =
955640681311292084896022829531366384024621189567662336953606158378698906672;
approve
Fully qualified path: openzeppelin_utils::selectors::approve
pub const approve: felt252 =
949021990203918389843157787496164629863144228991510976554585288817234167820;
set_approval_for_all
Fully qualified path: openzeppelin_utils::selectors::set_approval_for_all
pub const set_approval_for_all: felt252 =
382388771404233837070588331442889601370833807771636635875982668502759735615;
setApprovalForAll
Fully qualified path: openzeppelin_utils::selectors::setApprovalForAll
pub const setApprovalForAll: felt252 =
1280583940859288259579061247154630474140520431395903753515491282704959909530;
transfer_from
Fully qualified path: openzeppelin_utils::selectors::transfer_from
pub const transfer_from: felt252 =
1555377517929037318987687899825758707538299441176447799544473656894800517992;
transferFrom
Fully qualified path: openzeppelin_utils::selectors::transferFrom
pub const transferFrom: felt252 =
116061167288211781254449158074459916871457383008289084697957612485591092000;
safe_transfer_from
Fully qualified path: openzeppelin_utils::selectors::safe_transfer_from
pub const safe_transfer_from: felt252 =
648447342180401402773141177909728806790502458988112418214563587533689100387;
safeTransferFrom
Fully qualified path: openzeppelin_utils::selectors::safeTransferFrom
pub const safeTransferFrom: felt252 =
730327702935662484951878015260342994925824754530470619774470754812327453764;
on_erc721_received
Fully qualified path: openzeppelin_utils::selectors::on_erc721_received
pub const on_erc721_received: felt252 =
1605173061855856095828530318163295618975073308191709771213910053890324149768;
onERC721Received
Fully qualified path: openzeppelin_utils::selectors::onERC721Received
pub const onERC721Received: felt252 =
441833262846246486607087847804043886170335009155803575450536462761436446875;
uri
Fully qualified path: openzeppelin_utils::selectors::uri
pub const uri: felt252 =
1325483671348493396954156806081545940969392140614859338837721980635603669985;
balance_of_batch
Fully qualified path: openzeppelin_utils::selectors::balance_of_batch
pub const balance_of_batch: felt252 =
739041534260391839075010308432724380179936801892566220150699879184478976392;
balanceOfBatch
Fully qualified path: openzeppelin_utils::selectors::balanceOfBatch
pub const balanceOfBatch: felt252 =
492677946376808600929852653245981547831279241258259730050632633462969395907;
safe_batch_transfer_from
Fully qualified path: openzeppelin_utils::selectors::safe_batch_transfer_from
pub const safe_batch_transfer_from: felt252 =
1507885890829902860906790956815692246920905994909660809307241680906695044279;
safeBatchTransferFrom
Fully qualified path: openzeppelin_utils::selectors::safeBatchTransferFrom
pub const safeBatchTransferFrom: felt252 =
1011984872421844494651141556693751752127985442946177191791798333100036886581;
on_erc1155_received
Fully qualified path: openzeppelin_utils::selectors::on_erc1155_received
pub const on_erc1155_received: felt252 =
1186407550813887531441465721872992501849754496933584568919193834630249659978;
onERC1155Received
Fully qualified path: openzeppelin_utils::selectors::onERC1155Received
pub const onERC1155Received: felt252 =
1058604908644785912842808803488791941304420319380528410486576393521136952768;
on_erc1155_batch_received
Fully qualified path: openzeppelin_utils::selectors::on_erc1155_batch_received
pub const on_erc1155_batch_received: felt252 =
1585120547312374961643569655522380787514083809251432666979918454640698247968;
onERC1155BatchReceived
Fully qualified path: openzeppelin_utils::selectors::onERC1155BatchReceived
pub const onERC1155BatchReceived: felt252 =
1616118602249483054682097230374079235268756846695847205646164314408131480892;
decimals
Fully qualified path: openzeppelin_utils::selectors::decimals
pub const decimals: felt252 =
134830404806214277570220174593674215737759987247891306080029841794115377321;
total_supply
Fully qualified path: openzeppelin_utils::selectors::total_supply
pub const total_supply: felt252 =
603278275252936218847294002513349627170936020082667936993356353388973422646;
totalSupply
Fully qualified path: openzeppelin_utils::selectors::totalSupply
pub const totalSupply: felt252 =
227334030968744315992796982100494617316223563777432855541120004521101595501;
allowance
Fully qualified path: openzeppelin_utils::selectors::allowance
pub const allowance: felt252 =
863164345921111744606866654754108663958095967665259696902984674202985078753;
transfer
Fully qualified path: openzeppelin_utils::selectors::transfer
pub const transfer: felt252 =
232670485425082704932579856502088130646006032362877466777181098476241604910;
set_public_key
Fully qualified path: openzeppelin_utils::selectors::set_public_key
pub const set_public_key: felt252 =
1307260637166823203998179679098545329314629630090003875272134084395659334905;
setPublicKey
Fully qualified path: openzeppelin_utils::selectors::setPublicKey
pub const setPublicKey: felt252 =
332268845949430430346835224631316185987738351560356300584998172574125127129;
get_public_key
Fully qualified path: openzeppelin_utils::selectors::get_public_key
pub const get_public_key: felt252 =
740926757903304703334766688525052991028117105695935472386075434843853795643;
getPublicKey
Fully qualified path: openzeppelin_utils::selectors::getPublicKey
pub const getPublicKey: felt252 =
746980340705933969743234129682845497651127169517848574495754079322008797305;
is_valid_signature
Fully qualified path: openzeppelin_utils::selectors::is_valid_signature
pub const is_valid_signature: felt252 =
1138073982574099226972715907883430523600275391887289231447128254784345409857;
isValidSignature
Fully qualified path: openzeppelin_utils::selectors::isValidSignature
pub const isValidSignature: felt252 =
939740983698321109974372403944035053902509983902899284679678367046923648926;
supports_interface
Fully qualified path: openzeppelin_utils::selectors::supports_interface
pub const supports_interface: felt252 =
449669189040254036073397562335334473638127993485087795119181318051245994627;
serde
Fully qualified path: openzeppelin_utils::serde
Traits
Traits
Traits
SerializedAppend
Fully qualified path: openzeppelin_utils::serde::SerializedAppend
pub trait SerializedAppend<T>
Trait functions
append_serde
Fully qualified path: openzeppelin_utils::serde::SerializedAppend::append_serde
fn append_serde(ref self: Array<felt252>, value: T)
structs
Fully qualified path: openzeppelin_utils::structs
Modules
Modules
Modules
checkpoint
Fully qualified path: openzeppelin_utils::structs::checkpoint
Structs
| Trace | Trace struct, for checkpointing values as they change at different points in time, and later looking up past values by block timestamp. |
| Checkpoint | Generic checkpoint representation. |
Traits
Impls
Structs
Structs
| Trace | Trace struct, for checkpointing values as they change at different points in time, and later looking up past values by block timestamp. |
| Checkpoint | Generic checkpoint representation. |
Trace
Trace struct, for checkpointing values as they change at different points in
time, and later looking up past values by block timestamp.
Fully qualified path: openzeppelin_utils::structs::checkpoint::Trace
#[derive(Copy, Drop, starknet::Store)]
pub struct Trace {
pub checkpoints: StorageArray<Checkpoint>,
}
Members
checkpoints
Fully qualified path: openzeppelin_utils::structs::checkpoint::Trace::checkpoints
pub checkpoints: StorageArray<Checkpoint>
Checkpoint
Generic checkpoint representation.
Fully qualified path: openzeppelin_utils::structs::checkpoint::Checkpoint
[derive(Copy, Drop, Serde)]
pub struct Checkpoint {
pub key: u64,
pub value: u256,
}
Members
key
Fully qualified path: openzeppelin_utils::structs::checkpoint::Checkpoint::key
pub key: u64
value
Fully qualified path: openzeppelin_utils::structs::checkpoint::Checkpoint::value
pub value: u256
Traits
Traits
TraceTrait
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceTrait
pub trait TraceTrait
Trait functions
push
Pushes a (key, value) pair into a Trace so that it is stored as the checkpoint
and returns both the previous and the new value.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceTrait::push
fn push(ref self: Trace, key: u64, value: u256) -> (u256, u256)
upper_lookup
Returns the value in the last (most recent) checkpoint with the key lower than or equal to the search key, or zero if there is none.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceTrait::upper_lookup
fn upper_lookup(self: @Trace, key: u64) -> u256
upper_lookup_recent
Returns the value in the last (most recent) checkpoint with key lower than or equal to the search key, or zero if there is none.
NOTE: This is a variant of upper_lookup that is optimised to
find “recent” checkpoints (checkpoints with high keys).
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceTrait::upper_lookup_recent
fn upper_lookup_recent(self: @Trace, key: u64) -> u256
latest
Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceTrait::latest
fn latest(self: @Trace) -> u256
latest_checkpoint
Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value in the most recent checkpoint.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceTrait::latest_checkpoint
fn latest_checkpoint(self: @Trace) -> (bool, u64, u256)
length
Returns the number of checkpoints.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceTrait::length
fn length(self: @Trace) -> u32
at
Returns the checkpoint at given position.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceTrait::at
fn at(self: @Trace, pos: u32) -> Checkpoint
Impls
Impls
TraceImpl
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceImpl
pub impl TraceImpl of TraceTrait;
Impl functions
push
Pushes a (key, value) pair into a Trace so that it is stored as the checkpoint
and returns both the previous and the new value.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceImpl::push
fn push(ref self: Trace, key: u64, value: u256) -> (u256, u256)
upper_lookup
Returns the value in the last (most recent) checkpoint with the key lower than or equal to the search key, or zero if there is none.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceImpl::upper_lookup
fn upper_lookup(self: @Trace, key: u64) -> u256
upper_lookup_recent
Returns the value in the last (most recent) checkpoint with key lower than or equal to the search key, or zero if there is none.
NOTE: This is a variant of upper_lookup that is optimised to
find “recent” checkpoints (checkpoints with high keys).
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceImpl::upper_lookup_recent
fn upper_lookup_recent(self: @Trace, key: u64) -> u256
latest
Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceImpl::latest
fn latest(self: @Trace) -> u256
latest_checkpoint
Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value in the most recent checkpoint.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceImpl::latest_checkpoint
fn latest_checkpoint(self: @Trace) -> (bool, u64, u256)
length
Returns the number of checkpoints.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceImpl::length
fn length(self: @Trace) -> u32
at
Returns the checkpoint at given position.
Fully qualified path: openzeppelin_utils::structs::checkpoint::TraceImpl::at
fn at(self: @Trace, pos: u32) -> Checkpoint
storage_array
Fully qualified path: openzeppelin_utils::structs::storage_array
Structs
| StorageArray | Represents an Array that can be stored in storage. |
Traits
| StorageArrayTrait | Trait for accessing a storage array. read_at and write_at don’t check the length of the array, caution must be exercised…. |
Structs
Structs
| StorageArray | Represents an Array that can be stored in storage. |
StorageArray
Represents an Array that can be stored in storage.
Fully qualified path: openzeppelin_utils::structs::storage_array::StorageArray
[derive(Copy, Drop)]
pub struct StorageArray<T> { /* private fields */ }
Traits
Traits
| StorageArrayTrait | Trait for accessing a storage array. read_at and write_at don’t check the length of the array, caution must be exercised…. |
StorageArrayTrait
Trait for accessing a storage array.
read_at and write_at don’t check the length of the array, caution must be exercised.
The current length of the array is stored at the base StorageBaseAddress as felt.
Fully qualified path: openzeppelin_utils::structs::storage_array::StorageArrayTrait
pub trait StorageArrayTrait<T>
Trait functions
read_at
Fully qualified path: openzeppelin_utils::structs::storage_array::StorageArrayTrait::read_at
fn read_at(self: @StorageArray<T>, index: u32) -> T
write_at
Fully qualified path: openzeppelin_utils::structs::storage_array::StorageArrayTrait::write_at
fn write_at(ref self: StorageArray<T>, index: u32, value: T)
append
Fully qualified path: openzeppelin_utils::structs::storage_array::StorageArrayTrait::append
fn append(ref self: StorageArray<T>, value: T)
len
Fully qualified path: openzeppelin_utils::structs::storage_array::StorageArrayTrait::len
fn len(self: @StorageArray<T>) -> u32
unwrap_and_cast
Fully qualified path: openzeppelin_utils::unwrap_and_cast
Traits
Traits
Traits
UnwrapAndCast
Fully qualified path: openzeppelin_utils::unwrap_and_cast::UnwrapAndCast
pub trait UnwrapAndCast<T>
Trait functions
unwrap_and_cast
Fully qualified path: openzeppelin_utils::unwrap_and_cast::UnwrapAndCast::unwrap_and_cast
fn unwrap_and_cast(self: Result<Span<felt252>, Array<felt252>>) -> T
Free functions
Free functions
try_selector_with_fallback
Fully qualified path: openzeppelin_utils::try_selector_with_fallback
pub fn try_selector_with_fallback(
target: ContractAddress, selector: felt252, fallback: felt252, args: Span<felt252>,
) -> Result<Span<felt252>, Array<felt252>>
dispatchers
| INoncesDispatcherTrait | — |
| INoncesSafeDispatcherTrait | — |
| IUniversalDeployerDispatcherTrait | — |
| IUniversalDeployerSafeDispatcherTrait | — |
Structs
Structs
INoncesDispatcher
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct INoncesDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesDispatcher::contract_address
pub contract_address: ContractAddress
INoncesLibraryDispatcher
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct INoncesLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesLibraryDispatcher::class_hash
pub class_hash: ClassHash
INoncesSafeLibraryDispatcher
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesSafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct INoncesSafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesSafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
INoncesSafeDispatcher
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesSafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct INoncesSafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesSafeDispatcher::contract_address
pub contract_address: ContractAddress
IUniversalDeployerDispatcher
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IUniversalDeployerDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerDispatcher::contract_address
pub contract_address: ContractAddress
IUniversalDeployerLibraryDispatcher
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IUniversalDeployerLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerLibraryDispatcher::class_hash
pub class_hash: ClassHash
IUniversalDeployerSafeLibraryDispatcher
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerSafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IUniversalDeployerSafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerSafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
IUniversalDeployerSafeDispatcher
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerSafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IUniversalDeployerSafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerSafeDispatcher::contract_address
pub contract_address: ContractAddress
Traits
Traits
| INoncesDispatcherTrait | — |
| INoncesSafeDispatcherTrait | — |
| IUniversalDeployerDispatcherTrait | — |
| IUniversalDeployerSafeDispatcherTrait | — |
INoncesDispatcherTrait
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesDispatcherTrait
Part of the group: dispatchers
pub trait INoncesDispatcherTrait<T>
Trait functions
nonces
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesDispatcherTrait::nonces
fn nonces(self: T, owner: ContractAddress) -> felt252
INoncesSafeDispatcherTrait
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesSafeDispatcherTrait
Part of the group: dispatchers
pub trait INoncesSafeDispatcherTrait<T>
Trait functions
nonces
Fully qualified path: openzeppelin_utils::cryptography::interface::INoncesSafeDispatcherTrait::nonces
fn nonces(self: T, owner: ContractAddress) -> Result<felt252, Array<felt252>>
IUniversalDeployerDispatcherTrait
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerDispatcherTrait
Part of the group: dispatchers
pub trait IUniversalDeployerDispatcherTrait<T>
Trait functions
deploy_contract
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerDispatcherTrait::deploy_contract
fn deploy_contract(
self: T, class_hash: ClassHash, salt: felt252, from_zero: bool, calldata: Span<felt252>,
) -> ContractAddress
IUniversalDeployerSafeDispatcherTrait
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerSafeDispatcherTrait
Part of the group: dispatchers
pub trait IUniversalDeployerSafeDispatcherTrait<T>
Trait functions
deploy_contract
Fully qualified path: openzeppelin_utils::deployments::interface::IUniversalDeployerSafeDispatcherTrait::deploy_contract
fn deploy_contract(
self: T, class_hash: ClassHash, salt: felt252, from_zero: bool, calldata: Span<felt252>,
) -> Result<ContractAddress, Array<felt252>>