[][src]Trait ethcontract::contract::Deploy

pub trait Deploy<T: Transport>: Sized {
    type Context;
    fn bytecode(cx: &Self::Context) -> &Bytecode;
fn abi(cx: &Self::Context) -> &Abi;
fn from_deployment(
        web3: Web3<T>,
        address: Address,
        transaction_hash: H256,
        cx: Self::Context
    ) -> Self; }

a factory trait for deployable contract instances. this traits provides functionality for building a deployment and creating instances of a contract type at a given address.

this allows generated contracts to be deployable without having to create new builder and future types.

Associated Types

type Context

The type of the contract instance being created.

Loading content...

Required methods

fn bytecode(cx: &Self::Context) -> &Bytecode

Gets a reference to the contract bytecode.

fn abi(cx: &Self::Context) -> &Abi

Gets a reference the contract ABI.

fn from_deployment(
    web3: Web3<T>,
    address: Address,
    transaction_hash: H256,
    cx: Self::Context
) -> Self

Create a contract instance from the specified deployment.

Loading content...

Implementors

impl<T: Transport> Deploy<T> for Instance<T>[src]

type Context = Linker

Loading content...