The condition that checks the player’s nonce value in the Puppet challenge does not seem appropriate. #106
|
Calling testPuppet using startPrank(player, player) and then checking whether the player’s nonce is 1 does not seem appropriate. In the startPrank context, only msg.sender is set to the player—transactions like token transfers or function calls do not increase the nonce. As a result, even if multiple actions are performed (such as deploying an exploit contract and transferring tokens), the player’s nonce only becomes 1 because only the contract deployment counts. However, if you execute each action separately without deploying a contract and just call functions as msg.sender = player, no signed transaction occurs, so the nonce remains 0. Therefore, the nonce check condition should either be removed or replaced with a warning that says “you must deploy an attack contract.” |
Replies: 1 comment
|
Noticed that too, it's actually much more easy with the current checks since there's no need to create a contract |
Noticed that too, it's actually much more easy with the current checks since there's no need to create a contract
Also this problem is present in other 4 challenges that require a maximum number of transactions
I opened this pull request fixing this, using
vm.startBroadcastinstead ofvm.startPrank