git.delta.rocks / unique-network / refs/commits / 7781ab982a4b

difftreelog

source

crates/evm-coder/tests/solidity_generation.rs848 Bsourcehistory
1use evm_coder::{execution::Result, generate_stubgen, solidity_interface, types::*};23struct ERC20;45#[solidity_interface(name = "ERC20")]6impl ERC20 {7	fn decimals(&self) -> Result<uint8> {8		todo!()9	}10	/// Get balance of specified owner11	fn balance_of(&self, _owner: address) -> Result<uint256> {12		todo!()13	}14	fn transfer(&mut self, _caller: caller, _to: address, _value: uint256) -> Result<bool> {15		todo!()16	}17	fn transfer_from(18		&mut self,19		_caller: caller,20		_from: address,21		_to: address,22		_value: uint256,23	) -> Result<bool> {24		todo!()25	}26	fn approve(&mut self, _caller: caller, _spender: address, _value: uint256) -> Result<bool> {27		todo!()28	}29	fn allowance(&self, _owner: address, _spender: address) -> Result<uint256> {30		todo!()31	}32}3334generate_stubgen!(gen_impl, ERC20Call, true);35generate_stubgen!(gen_iface, ERC20Call, false);