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 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