From 97b1c25f2bf90a5e35376d77989d0635b371b4c7 Mon Sep 17 00:00:00 2001 From: Michael Birch Date: Wed, 29 Nov 2023 13:26:09 -0500 Subject: [PATCH] Chore: pass contract feature down from aurora-engine-transactions crate (#876) ## Description This PR adds the `contract` feature to the `aurora-engine-transactions` crate. This allows Near smart contracts using this crate to use the `ecrecover` host function in the Near runtime to check transaction signatures instead of relying on an implementation inside the contract. This is important because the host function uses much less gas and allows the smart contract to be much smaller. ## Performance / NEAR gas cost considerations N/A ## Testing N/A --- engine-precompiles/Cargo.toml | 2 +- engine-transactions/Cargo.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/engine-precompiles/Cargo.toml b/engine-precompiles/Cargo.toml index fd01fd0eb..723f9958c 100644 --- a/engine-precompiles/Cargo.toml +++ b/engine-precompiles/Cargo.toml @@ -34,7 +34,7 @@ serde_json.workspace = true default = ["std"] std = ["aurora-engine-types/std", "aurora-engine-sdk/std", "bn/std", "evm/std", "libsecp256k1/std", "ripemd/std", "sha2/std", "sha3/std", "ethabi/std"] borsh-compat = ["aurora-engine-types/borsh-compat", "aurora-engine-sdk/borsh-compat"] -contract = [] +contract = ["aurora-engine-sdk/contract"] log = [] error_refund = [] ext-connector = [] diff --git a/engine-transactions/Cargo.toml b/engine-transactions/Cargo.toml index fdc3e805f..0fe9450fe 100644 --- a/engine-transactions/Cargo.toml +++ b/engine-transactions/Cargo.toml @@ -24,3 +24,4 @@ hex.workspace = true [features] std = ["aurora-engine-types/std", "aurora-engine-sdk/std", "aurora-engine-precompiles/std", "evm/std", "rlp/std"] impl-serde = ["aurora-engine-types/impl-serde", "serde"] +contract = ["aurora-engine-sdk/contract", "aurora-engine-precompiles/contract"]