Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Made ecrecover implementation trait public (#11188)
Browse files Browse the repository at this point in the history
* Made ecrecover Implementation trait public

* Make all builtin contract types public

This ensure the API is consistent in terms of visibility.
  • Loading branch information
tolbrino authored and dvdplm committed Nov 6, 2019
1 parent efd9c03 commit fca912e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ethcore/builtin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use parity_bytes::BytesRef;
use parity_crypto::digest;

/// 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>;
}
Expand Down Expand Up @@ -359,31 +359,31 @@ impl Implementation for EthereumBuiltin {
}

#[derive(Debug)]
struct Identity;
pub struct Identity;

#[derive(Debug)]
struct EcRecover;
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> {
Expand Down

0 comments on commit fca912e

Please sign in to comment.