default with default abi if compiled with yul

pull/7/head
yann300 6 years ago committed by GitHub
parent 7bf65ad23d
commit bb82e32825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      remix-solidity/src/compiler/compiler.js

@ -373,6 +373,14 @@ 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) {
contract.object.abi.push({
'payablepayable': true,
'stateMutability': 'payable',
'type': 'fallback'
})
}
data.contracts[contract.file][contract.name].abi = solcABI.update(truncateVersion(currentVersion), contract.object.abi)
})
return data

Loading…
Cancel
Save