truffle-box / bare-box

Truffle Box for a bare-minimum Truffle project (`truffle init`)
21 stars 25 forks source link

Migrations.sol‘s upgrade() won't execute correctly #5

Open yushih opened 6 years ago

yushih commented 6 years ago

I'm not 100% about understanding the upgrade() method correctly so apologies in advance if I got this wrong. The upgrade() method looks problematic: suppose upgraded.setCompleted has the same restricted() modifier as "this" contract, then it should fail because msg.sender is the address of "this" contract which could not be upgraded.owner. So there is no way the upgrade.setCompleted call could be executed successfully.