Expand description
Implementations of Crypto Cheatcodes.
Re-exportsΒ§
use crate::Cheatcode;πuse crate::CheatcodesCore;πuse crate::Error;πuse crate::Result;πuse alloy_primitives::Address;πuse alloy_primitives::B256;πuse alloy_primitives::U256;πuse alloy_primitives::keccak256;πuse alloy_signer::Signer;πuse alloy_signer::SignerSync;πuse alloy_signer_local::MnemonicBuilder;πuse alloy_signer_local::PrivateKeySigner;πuse alloy_signer_local::coins_bip39::ChineseSimplified;πuse alloy_signer_local::coins_bip39::ChineseTraditional;πuse alloy_signer_local::coins_bip39::Czech;πuse alloy_signer_local::coins_bip39::English;πuse alloy_signer_local::coins_bip39::French;πuse alloy_signer_local::coins_bip39::Italian;πuse alloy_signer_local::coins_bip39::Japanese;πuse alloy_signer_local::coins_bip39::Korean;πuse alloy_signer_local::coins_bip39::Portuguese;πuse alloy_signer_local::coins_bip39::Spanish;πuse alloy_signer_local::coins_bip39::Wordlist;πuse alloy_sol_types::SolValue;πuse foundry_common::tempo::configurable_account;πuse foundry_common::tempo::configurable_account::p256_public_key;πuse foundry_common::tempo::configurable_account::quorum;πuse foundry_common::tempo::configurable_account::sign_p256_low_s;πuse foundry_common::wallet::derive_private_key;πuse foundry_common::wallet::derive_private_key_with_language;πuse k256::AffinePoint;πuse k256::EncodedPoint;πuse k256::FieldBytes;πuse k256::FieldElement;πuse k256::ProjectivePoint;πuse k256::Scalar;πuse k256::ecdsa::SigningKey;πuse k256::ecdsa::hazmat;πuse k256::elliptic_curve::bigint::ArrayEncoding;πuse k256::elliptic_curve::bigint::U256 as K256U256;πuse k256::elliptic_curve::group::Group;πuse k256::elliptic_curve::ops::Reduce;πuse k256::elliptic_curve::sec1::FromEncodedPoint;πuse k256::elliptic_curve::sec1::ToEncodedPoint;πuse p256::ecdsa::SigningKey as P256SigningKey;πuse base64::Engine;πuse base64::engine::general_purpose::URL_SAFE_NO_PAD;πuse ed25519_consensus::Signature as Ed25519Signature;πuse ed25519_consensus::SigningKey as Ed25519SigningKey;πuse ed25519_consensus::VerificationKey as Ed25519VerificationKey;πuse sha2::Digest;πuse sha2::Sha256;πuse std::collections::BTreeMap;πuse tempo_primitives::transaction::ConfigurableAccountConfig as TempoAccountConfig;πuse tempo_primitives::transaction::ConfigurableAccountOwner as TempoAccountOwner;πuse tempo_primitives::transaction::ConfigurableAccountSignature;πuse tempo_primitives::transaction::KeychainSignature;πuse tempo_primitives::transaction::MAX_CONFIGURABLE_ACCOUNT_SIGNATURES;πuse tempo_primitives::transaction::PrimitiveSignature;πuse tempo_primitives::transaction::TempoSignature;πuse tempo_primitives::transaction::configurable_account_digest;πuse tempo_primitives::transaction::tt_signature::WebAuthnSignature;πuse tempo_primitives::transaction::tt_signature::derive_p256_address;πuse crate::Vm::*;π
ConstantsΒ§
- DEFAULT_
DERIVATION_ πPATH_ PREFIX - The BIP32 default derivation path prefix.
- PRIVATE_
KEY_ πSIGNER_ CACHE_ LIMIT
FunctionsΒ§
- create_
ed25519_ πkey - create_
wallet π - Using a given private key, return its public ETH address, its public key affine x and y coordinates, and its private key (see the βWalletβ struct)
- derive_
key π - derive_
key_ πstr - derive_
wallets π - derive_
wallets_ πstr - encode_
affine_ πpoint - encode_
compact_ πsig - encode_
full_ πsig - encode_
projective_ πpoint - inject_
wallet π - owner_
key_ πaddress - Returns the owner address of
key. - parse_
affine_ πpoint - parse_
field_ πelement - parse_
private_ πkey - parse_
private_ πkey_ p256 - parse_
projective_ πpoint - parse_
signing_ πkey_ ed25519 - parse_
wallet π - public_
key_ πed25519 - reduce_
ec_ πscalar - sign π
- sign_
cached π - sign_
configurable_ πaccount - Signs
inneras the configurable accountaccountwith the fewest ofkeysthat form a quorum the node accepts: at most 8 approvals, sorted by owner, the last of which reaches the threshold. - sign_
ed25519 π - sign_
keychain π - sign_
owner_ πapproval - Signs
digestwith an owner key as a Tempo primitive signature. - sign_
p256 π - sign_
with_ πnonce - Signs
digeston secp256k1 using a user-supplied ephemeral noncek(no RFC6979). - sign_
with_ πwallet - tempo_
account_ πconfig - Converts a cheatcode configurable account config to Tempoβs.
- validate_
private_ πkey - verify_
ed25519 π - with_
private_ πkey_ signer