Merge pull request #1219 from ethereum/yann300-patch-15

Default abi if compiled with yul
pull/5370/head
yann300 6 years ago committed by GitHub
commit ce9c0a985c
  1. 10
      remix-solidity/src/compiler/compiler.js

@ -373,6 +373,16 @@ function Compiler (handleImportCall) {
function updateInterface (data) {
txHelper.visitContracts(data.contracts, (contract) => {
if (!contract.object.abi) contract.object.abi = []
if (language === 'Yul' && contract.object.abi.length === 0) {
// yul compiler does not return any abi,
// we default to accept the fallback function (which expect raw data as argument).
contract.object.abi.push({
'payable': true,
'stateMutability': 'payable',
'type': 'fallback'
})
}
data.contracts[contract.file][contract.name].abi = solcABI.update(truncateVersion(currentVersion), contract.object.abi)
})
return data

Loading…
Cancel
Save