-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The format of http://solc-bin.ethereum.org/bin/soljson-v*.js has changed from version 0.5.14.
This results in the fact that source with a compiler version of 0.5.14 or higher shows the error:
Error: Contract could not be compiled. Try another pragma solidity version.
Until version 0.5.13:
https://solc-bin.ethereum.org/bin/soljson-v0.5.13+commit.5b0b510c.js
var Module=typeof Module!=="undefined"?Module:{};
https://solc-bin.ethereum.org/bin/soljson-v0.5.14+commit.1f1aaa4.js
"use strict";var Module=typeof Module!=="undefined"?Module:{}
This breaks the following piece of code (e.g. the checking for var Module).
async function getCompilersource(compilerURL) {
try {
const opts = {
url: compilerURL,
caching: true,
transform: function (data) {
if (data.substring(0, 10) != 'var Module') {
throw Error('get compiler source fail');
}
return data;
}
};
return await promiseAjax(opts);
} catch (error) {
throw error;
}
}
Source is probably:
https://github.com/alincode/solcjs-core/blob/master/src/getCompilersource.js#L12
Metadata
Metadata
Assignees
Labels
No labels