Struct enigma_tools_u::web3_utils::enigma_contract::EnigmaContract [−][src]
pub struct EnigmaContract { pub web3: Web3<Http>, pub contract: Contract<Http>, pub account: Address, pub eloop: EventLoopHandle, pub abi_path: String, pub address_str: String, pub account_str: String, pub url: String, pub abi_str: String, }
Main interface to the enigma contract functions on ethereum.
Fields
web3: Web3<Http>
contract: Contract<Http>
account: Address
The ethereum account that interacts with the contract.
eloop: EventLoopHandle
abi_path: String
address_str: String
Enigma contract address
account_str: String
url: String
Ethereum network url
abi_str: String
Methods
impl EnigmaContract
[src]
impl EnigmaContract
pub fn new(
web3: Web3<Http>,
eloop: EventLoopHandle,
address: &str,
path: &str,
account: &str,
url: &str
) -> Self
[src]
pub fn new(
web3: Web3<Http>,
eloop: EventLoopHandle,
address: &str,
path: &str,
account: &str,
url: &str
) -> Self
create a new Enigma contract.
pub fn deployed(
web3: &Web3<Http>,
address: Address,
path: &str
) -> (Contract<Http>, String)
[src]
pub fn deployed(
web3: &Web3<Http>,
address: Address,
path: &str
) -> (Contract<Http>, String)
Fetch the Enigma contract deployed on Ethereum using an HTTP Web3 provider
pub fn connect_to_deployed(
url: String,
address: Address,
abi: String
) -> Result<Contract<Http>, Error>
[src]
pub fn connect_to_deployed(
url: String,
address: Address,
abi: String
) -> Result<Contract<Http>, Error>
connect to web3 and Fetch the Enigma contract deployed on Ethereum using an HTTP Web3 provider
pub fn load_abi(path: &str) -> Result<(String, String), Error>
[src]
pub fn load_abi(path: &str) -> Result<(String, String), Error>
given a path load EnigmaContract.json and extract the ABI
pub fn load_bytecode(path: &str) -> Result<String, Error>
[src]
pub fn load_bytecode(path: &str) -> Result<String, Error>
given a path load contract bytecode
pub fn register_as_worker(
&self,
signer: &String,
report: &Vec<u8>,
gas_limit: &String
) -> Result<(), Error>
[src]
pub fn register_as_worker(
&self,
signer: &String,
report: &Vec<u8>,
gas_limit: &String
) -> Result<(), Error>
contract function, register as a new worker.
pub fn connect(url: &str) -> (EventLoopHandle, Web3<Http>)
[src]
pub fn connect(url: &str) -> (EventLoopHandle, Web3<Http>)
connect to the ethereum network
Auto Trait Implementations
impl Send for EnigmaContract
impl Send for EnigmaContract
impl Sync for EnigmaContract
impl Sync for EnigmaContract