Skip to content

Commit cbf40f3

Browse files
committed
do not deploy interfaces
1 parent b851cb7 commit cbf40f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/handler.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,10 @@ class Blockchain {
397397
async deploy(contracts, callback) {
398398
//sort deploy other contracts first
399399
Object.entries(contracts).sort((a, b) => a[1].main ? 10 : -1).forEach(([templateContractName, o]) => {
400+
if(o.evm.bytecode.object.length === 0){
401+
return; //no bytecode, probably an interface
402+
}
403+
400404
let thisContract = {
401405
bytecode: o.evm.bytecode.object,
402406
abi: o.abi,
@@ -405,6 +409,7 @@ class Blockchain {
405409
main: o.main,
406410
accounts: undefined
407411
}
412+
408413
this.deployed[templateContractName] = thisContract;
409414
this.getAccounts()
410415
.then(accounts => {

0 commit comments

Comments
 (0)