ethers_utils/
erc20.rs

1use ethers::prelude::abigen;
2
3abigen!(ERC20, r#"[
4function name() public view returns (string)
5function symbol() public view returns (string)
6function decimals() public view returns (uint8)
7function totalSupply() public view returns (uint256)
8function balanceOf(address _owner) public view returns (uint256 balance)
9function transfer(address _to, uint256 _value) public returns (bool success)
10function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)
11function approve(address _spender, uint256 _value) public returns (bool success)
12function allowance(address _owner, address _spender) public view returns (uint256 remaining)
13
14event Transfer(address indexed _from, address indexed _to, uint256 _value)
15event Approval(address indexed _owner, address indexed _spender, uint256 _value)
16]"#; );
17
18#[cfg(test)]
19mod test {
20    use super::*;
21
22    #[test]
23    fn erc20() {
24        type _ERC20<M> = ERC20<M>;
25    }
26}