From 033a9d446528f1d4201b1bc868fb9bdcba55ce81 Mon Sep 17 00:00:00 2001 From: John Newby Date: Fri, 2 Aug 2019 10:46:41 +0200 Subject: [PATCH 1/2] Made ecrecover Implementation trait public --- ethcore/builtin/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethcore/builtin/src/lib.rs b/ethcore/builtin/src/lib.rs index 78633a12ef7..64be4de03b5 100644 --- a/ethcore/builtin/src/lib.rs +++ b/ethcore/builtin/src/lib.rs @@ -37,7 +37,7 @@ use parity_crypto::digest; use eip_152::compress; /// Native implementation of a built-in contract. -trait Implementation: Send + Sync { +pub trait Implementation: Send + Sync { /// execute this built-in on the given input, writing to the given output. fn execute(&self, input: &[u8], output: &mut BytesRef) -> Result<(), &'static str>; } @@ -308,7 +308,7 @@ fn ethereum_builtin(name: &str) -> Result, EthcoreError> struct Identity; #[derive(Debug)] -struct EcRecover; +pub struct EcRecover; #[derive(Debug)] struct Sha256; From 02eb78b31a0ca48711169dbc0c04a03ca6828f68 Mon Sep 17 00:00:00 2001 From: Tino Breddin Date: Tue, 22 Oct 2019 11:31:10 +0200 Subject: [PATCH 2/2] Make all builtin contract types public This ensure the API is consistent in terms of visibility. --- ethcore/builtin/src/lib.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ethcore/builtin/src/lib.rs b/ethcore/builtin/src/lib.rs index 64be4de03b5..3ecc1499fab 100644 --- a/ethcore/builtin/src/lib.rs +++ b/ethcore/builtin/src/lib.rs @@ -305,31 +305,31 @@ fn ethereum_builtin(name: &str) -> Result, EthcoreError> // - blake2_f (The Blake2 compression function F, EIP-152) #[derive(Debug)] -struct Identity; +pub struct Identity; #[derive(Debug)] pub struct EcRecover; #[derive(Debug)] -struct Sha256; +pub struct Sha256; #[derive(Debug)] -struct Ripemd160; +pub struct Ripemd160; #[derive(Debug)] -struct Modexp; +pub struct Modexp; #[derive(Debug)] -struct Bn128Add; +pub struct Bn128Add; #[derive(Debug)] -struct Bn128Mul; +pub struct Bn128Mul; #[derive(Debug)] -struct Bn128Pairing; +pub struct Bn128Pairing; #[derive(Debug)] -struct Blake2F; +pub struct Blake2F; impl Implementation for Identity { fn execute(&self, input: &[u8], output: &mut BytesRef) -> Result<(), &'static str> {