Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 41 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
"license": "MIT",
"dependencies": {
"abi-to-sol": "^0.6.6",
"abi-to-sol": "^0.7.1",
"ganache": "^7.0.4",
"minimist": "^1.2.5",
"readline-sync": "^1.4.10",
Expand Down
5 changes: 3 additions & 2 deletions src/compiler/remoteCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function getRemoteCompiler(solidityVersion) {
//.import interface 0x40cfee8d71d67108db46f772b7e2cd55813bf2fb test2
function getRemoteInterfaceFromEtherscan(address, name, chain, solidityVersion, apikey) {
return new Promise((resolve, reject) => {

let provider = `https://api${(!chain || chain == "mainnet") ? "" : `-${chain}`}.etherscan.io`
let url = `${provider}/api?module=contract&action=getabi&address=${address}&apikey=${apikey || 'YourApiKeyToken'}`;
request.get(url, (err, res, body) => {
Expand All @@ -75,9 +75,10 @@ function getRemoteInterfaceFromEtherscan(address, name, chain, solidityVersion,
name: name,
solidityVersion: solidityVersion,
abi,
mode: "embedded",
outputAttribution: false,
outputSource: false,
});
src = src.substring(src.indexOf("\n\n") + 2); // strip license/pragma
return resolve(src)
}
})
Expand Down