Skip to content

Commit

Permalink
feat: adapt the exitToNear precompile to be compatible with OMNI brid…
Browse files Browse the repository at this point in the history
…ge (#992)

## Description

The PR introduces changes to the `exitToNear` precompile, which allows
the withdrawal of tokens via the OMNI bridge.

## Performance / NEAR gas cost considerations

There is no performance changes.

## Testing

Added tests for parsing new type of incoming arguments.
  • Loading branch information
aleksuss authored Feb 5, 2025
1 parent 79c549f commit 1b4083c
Show file tree
Hide file tree
Showing 8 changed files with 1,156 additions and 523 deletions.
636 changes: 361 additions & 275 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ near-primitives = "0.27"
near-primitives-core = "0.27"
near-sdk = "5"
near-vm-runner = { version = "0.27", features = ["wasmtime_vm", "wasmer2_vm", "near_vm"] }
near-workspaces = "0.16"
near-workspaces = "0.17"
num = { version = "0.4", default-features = false, features = ["alloc"] }
postgres = "0.19"
primitive-types = { version = "0.13", default-features = false, features = ["rlp", "serde_no_std"] }
Expand Down
3 changes: 0 additions & 3 deletions engine-precompiles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,7 @@ impl<'a, I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> Precompiles<'a, I, E,
ctx: PrecompileConstructorContext<'a, I, E, H, M>,
) -> Self {
let near_exit = ExitToNear::new(ctx.current_account_id.clone(), ctx.io);
#[cfg(not(feature = "ext-connector"))]
let ethereum_exit = ExitToEthereum::new(ctx.current_account_id.clone(), ctx.io);
#[cfg(feature = "ext-connector")]
let ethereum_exit = ExitToEthereum::new(ctx.io);
let cross_contract_call = CrossContractCall::new(ctx.current_account_id, ctx.io);
let predecessor_account_id = PredecessorAccount::new(ctx.env);
let prepaid_gas = PrepaidGas::new(ctx.env);
Expand Down
Loading

0 comments on commit 1b4083c

Please sign in to comment.