Docs.rs
  • evm-coder-0.4.1
    • evm-coder 0.4.1
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • CertainLach
    • gregzaitsev
    • Dependencies
      • ethereum ^0.14.0 normal
      • evm-coder-procedural ^0.4.1 normal
      • impl-trait-for-tuples ^0.2.2 normal
      • primitive-types ^0.12.1 normal
      • sha3-const ^0.1.1 normal
      • bondrewd ^0.1.14 dev
      • derivative ^2.2 dev
      • evm-coder-procedural ^0.4.1 dev
      • hex ^0.4.3 dev
      • hex-literal ^0.3.4 dev
      • similar-asserts ^1.4 dev
      • trybuild ^1.0 dev
    • Versions
    • 82.69% of the crate is documented
  • Go to latest version
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation
logo

Crate evm_coder

logo

Crate evm_coder

  • Version 0.4.1
  • All Items
  • Re-exports
  • Modules
  • Macros
  • Structs
  • Enums
  • Traits
  • Type Aliases
  • Attribute Macros
  • Derive Macros

Crates

  • evm_coder
?
Change settings

Crate evm_coder

source ·
Expand description

evm-coder

Library for seamless call translation between Rust and Solidity code

By encoding solidity definitions in Rust, this library also provides generation of solidity interfaces for ethereum developers

Overview

Most of this library functionality shouldn’t be used directly, but via macros

  • solidity_interface
  • ToLog
  • AbiCoder

Re-exports

  • pub use self::abi::AbiDecode;
  • pub use self::abi::AbiDecoder;
  • pub use self::abi::AbiEncode;
  • pub use self::abi::AbiEncoder;

Modules

  • abi
    Implementation of EVM RLP reader/writer
  • custom_signature
    A module for custom signature support.
  • types
    Solidity type definitions (aliases from solidity name to rust type) To be used in solidity_interface definitions, to make sure there is no type conflict between Rust code and generated definitions

Macros

  • dummy_contract
    Implement dummy Contract trait, used for tests Allows contract methods to return either T, or Result<T, String> for any T
  • event_topic
    Returns solidity topic (hash) by its textual representation
  • fn_selector
    Returns solidity function selector (first 4 bytes of hash) by its textual representation
  • generate_stubgen
    Generate “tests”, which will generate solidity code on execution and print it to stdout Script at .maintain/scripts/generate_api.sh can split this output from test runtime
  • make_signature
    Macro to create signatures of types and functions.

Structs

  • DummyPost
    Example of PostInfo, used in tests

Enums

  • ERC165Call
    Implementation of ERC165 is implicitly generated for all interfaces in solidity_interface, this structure holds parsed data for ERC165Call subvariant

Traits

  • Call
    Parseable EVM call, this trait should be implemented with solidity_interface macro
  • Callable
    Type callable with ethereum message, may be implemented by solidity_interface macro on interface implementation, or for externally-owned real EVM contract
  • Contract
    Contract configuration
  • ToLog
    Implementation of this trait should not be written manually, instead use crate::ToLog proc macros.
  • ToTopic
    Only items implementing ToTopic may be used as #[indexed] field in crate::ToLog macro usage.

Type Aliases

  • ResultOf
    Contract specific result type
  • ResultWithPostInfoOf
    Contract specific result type

Attribute Macros

  • solidity_interface
    Derives call enum implementing crate::Callable and crate::Call from impl block.

Derive Macros

  • AbiCoder
    Macro to include support for structures and enums in Solidity.
  • ToLog
    Derives ToLog for enum

Results

trait
evm_coder::Callable
Type callable with ethereum message, may be implemented by …
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.