curvegrid / multibaas-for-google-sheets

MIT License
8 stars 4 forks source link

Include contract code if requested #29

Closed shoenseiwaso closed 3 years ago

shoenseiwaso commented 4 years ago

The following line: https://github.com/curvegrid/multibaas-for-google-sheets/blob/de26ec61ad2cdd6d0be01128449c9c1fdd0d5b72/src/Code.js#L237

Should be modified to something like:

const includeCode = isCode ? '&include=code' : '';
const queryPath = `chains/ethereum/addresses/${address}?include=balance${includeCode}`;

To test on mainnet:

=mbaddress("0xdac17f958d2ee523a2206206994597c13d831ec7",true,true)

The "code" column should include the contract's bytecode.