Skip to content

Commit

Permalink
Make traits crate public
Browse files Browse the repository at this point in the history
  • Loading branch information
ark0f committed Sep 25, 2023
1 parent 41f1ec5 commit 0a79188
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions core-backend/src/funcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ impl From<u32> for SysCallReturnValue {
}
}

pub trait SysCallContext: Sized {
pub(crate) trait SysCallContext: Sized {
fn from_args(args: &[Value]) -> Result<(Self, &[Value]), HostError>;
}

pub trait SysCall<Ext, T = ()> {
pub(crate) trait SysCall<Ext, T = ()> {
type Context: SysCallContext;

fn execute(
Expand All @@ -177,7 +177,7 @@ pub trait SysCall<Ext, T = ()> {
) -> Result<(u64, T), HostError>;
}

pub trait SysCallBuilder<Ext, Args: ?Sized, R, S> {
pub(crate) trait SysCallBuilder<Ext, Args: ?Sized, R, S> {
fn build(self, args: &[Value]) -> Result<S, HostError>;
}

Expand Down Expand Up @@ -1245,7 +1245,14 @@ where

ctx.ext_mut()
.create_program(
InitPacket::maybe_with_gas(code_id.into(), salt, payload, Some(message_id), gas_limit, value),
InitPacket::maybe_with_gas(
code_id.into(),
salt,
payload,
Some(message_id),
gas_limit,
value,
),
delay,
)
.map_err(Into::into)
Expand Down

0 comments on commit 0a79188

Please sign in to comment.