Visual Studio Code language support extension for Solidity smart contracts in Ethereum https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity
creates the sol and abi files, then compile and generate CSharp
in the abi, you have:
contract ERC20Basic {
uint public _totalSupply;
function totalSupply() public constant returns (uint);
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
event Transfer(address indexed from, address indexed to, uint value);
}
Problem: the variable has an underscore with the same name as the function. The code generated removes the underscore and generates a duplicate function names.
Generated code (4 functions, 2 sets are duplicated)
Thanks, yes, that is a general issue with anti patterns on public fields. I will need to modify the code generator (brainstorming here) in this scenario to include the suffix when there is a duplicate.
Trying to generate the interface files for USDT - Tether on the Ethereum Network in order to interact with the contract, sending and receiving USDT.
Steps:
Solidity Download contract: ethereum, contract address: 0xdac17f958d2ee523a2206206994597c13d831ec7
creates the sol and abi files, then compile and generate CSharp
in the abi, you have: contract ERC20Basic { uint public _totalSupply; function totalSupply() public constant returns (uint); function balanceOf(address who) public constant returns (uint); function transfer(address to, uint value) public; event Transfer(address indexed from, address indexed to, uint value); }
Problem: the variable has an underscore with the same name as the function. The code generated removes the underscore and generates a duplicate function names.
Generated code (4 functions, 2 sets are duplicated)