ethabi_decode/
lib.rs

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