1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
// Copyright 2020 Snowfork
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 <LICENSE or
// http://www.apache.org/licenses/LICENSE-2.0>. This file may not be
// copied, modified, or distributed except according to those terms.
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(not(feature = "std"))]
extern crate alloc;
mod decoder;
mod encoder;
mod event;
mod param;
mod std;
mod token;
mod util;
pub use crate::{
decoder::decode,
encoder::{encode, encode_function},
event::Event,
param::{Param, ParamKind},
token::Token,
};
#[derive(Debug)]
pub enum Error {
/// Invalid entity such as a bad function name.
InvalidName,
/// Invalid data.
InvalidData
}
/// ABI Address
pub use ethereum_types::Address;
/// ABI word.
pub type Word = [u8; 32];
/// ABI Int and UInt
pub use ethereum_types::U256;
/// Hash
pub use ethereum_types::H256;