cairo_lang_sierra::extensions::modules::starknet::syscalls

Trait SyscallGenericLibfunc

source
pub trait SyscallGenericLibfunc: Default {
    const STR_ID: &'static str;

    // Required methods
    fn input_tys(
        context: &dyn SignatureSpecializationContext,
    ) -> Result<Vec<ConcreteTypeId>, SpecializationError>;
    fn success_output_tys(
        context: &dyn SignatureSpecializationContext,
    ) -> Result<Vec<ConcreteTypeId>, SpecializationError>;
}
Expand description

Trait for implementing a library function for syscalls.

Required Associated Constants§

source

const STR_ID: &'static str

The library function id.

Required Methods§

source

fn input_tys( context: &dyn SignatureSpecializationContext, ) -> Result<Vec<ConcreteTypeId>, SpecializationError>

The non implicits inputs for the libfunc.

source

fn success_output_tys( context: &dyn SignatureSpecializationContext, ) -> Result<Vec<ConcreteTypeId>, SpecializationError>

The success case non implicits outputs of the libfunc.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

source§

impl SyscallGenericLibfunc for EmitEventLibfunc

source§

const STR_ID: &'static str = "emit_event_syscall"

source§

impl SyscallGenericLibfunc for CallContractLibfunc

source§

const STR_ID: &'static str = "call_contract_syscall"

source§

impl SyscallGenericLibfunc for DeployLibfunc

source§

const STR_ID: &'static str = "deploy_syscall"

source§

impl SyscallGenericLibfunc for LibraryCallLibfunc

source§

const STR_ID: &'static str = "library_call_syscall"

source§

impl SyscallGenericLibfunc for SendMessageToL1Libfunc

source§

const STR_ID: &'static str = "send_message_to_l1_syscall"

source§

impl SyscallGenericLibfunc for GetBlockHashLibfunc

source§

const STR_ID: &'static str = "get_block_hash_syscall"

source§

impl SyscallGenericLibfunc for StorageReadLibfunc

source§

const STR_ID: &'static str = "storage_read_syscall"

source§

impl SyscallGenericLibfunc for StorageWriteLibfunc

source§

const STR_ID: &'static str = "storage_write_syscall"

source§

impl SyscallGenericLibfunc for GetClassHashAtLibfunc

source§

const STR_ID: &'static str = "get_class_hash_at_syscall"

source§

impl SyscallGenericLibfunc for KeccakLibfunc

source§

const STR_ID: &'static str = "keccak_syscall"

source§

impl SyscallGenericLibfunc for ReplaceClassLibfunc

source§

const STR_ID: &'static str = "replace_class_syscall"

source§

impl SyscallGenericLibfunc for Sha256ProcessBlockLibfunc

source§

const STR_ID: &'static str = "sha256_process_block_syscall"

source§

impl<T: Secp256Trait> SyscallGenericLibfunc for Secp256AddLibfunc<T>

source§

const STR_ID: &'static str = T::STR_ID_ADD

source§

impl<T: Secp256Trait> SyscallGenericLibfunc for Secp256GetPointFromXLibfunc<T>

source§

const STR_ID: &'static str = T::STR_ID_GET_POINT_FROM_X

source§

impl<T: Secp256Trait> SyscallGenericLibfunc for Secp256GetXyLibfunc<T>

source§

const STR_ID: &'static str = T::STR_ID_GET_XY

source§

impl<T: Secp256Trait> SyscallGenericLibfunc for Secp256MulLibfunc<T>

source§

const STR_ID: &'static str = T::STR_ID_MUL

source§

impl<T: Secp256Trait> SyscallGenericLibfunc for Secp256NewLibfunc<T>

source§

const STR_ID: &'static str = T::STR_ID_NEW

source§

impl<TGetterTraitsEx: GetterTraitsEx> SyscallGenericLibfunc for GetterLibfunc<TGetterTraitsEx>

source§

const STR_ID: &'static str = TGetterTraitsEx::STR_ID