You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you ensured that all of these are up to date?
Foundry
Foundryup
What version of Foundry are you on?
forge 0.2.0
What command(s) is the bug in?
forge script
Operating System
Linux
Describe the bug
Contract.sol
contract Contract {
uint256 public number = 1;
}
Contract.s.sol
contract ContractScript is Script {
function setUp() public {
vm.startBroadcast();
}
function run() public {
new Contract();
}
}
running forge script script/Contract.s.sol -f goerli --private-key $pk --broadcast
increases the nonce of the deployer by 1, there is no pending tx/creation after waiting for 1min.
to fix the issue, one have to make a tx from e.g. metamask, i did a self transfer:
as you can see in the screenshot above, the contract creation tx appears!
and confirms:
this only happens when vm.startBroadcast() is in setUp() as far as i know.
The text was updated successfully, but these errors were encountered:
Traces:
[101253] → new CounterScript@0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496
└─ ← [Return] 395 bytes of code
[2979] CounterScript::setUp()
├─ [0] VM::startBroadcast()
│ └─ ← [Return]
└─ ← [Stop]
[3011] CounterScript::run()
├─ [0] VM::broadcast()
│ └─ ← [Revert] a broadcast is active already
└─ ← [Revert] a broadcast is active already
Gas used: 24075
Error:
script failed: a broadcast is active alread
Marking this as resolved by #5998 as user cannot encounter the reported issue anymore
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0
What command(s) is the bug in?
forge script
Operating System
Linux
Describe the bug
Contract.sol
Contract.s.sol
running
forge script script/Contract.s.sol -f goerli --private-key $pk --broadcast
increases the nonce of the deployer by 1, there is no pending tx/creation after waiting for 1min.
to fix the issue, one have to make a tx from e.g. metamask, i did a self transfer:
as you can see in the screenshot above, the contract creation tx appears!
and confirms:
this only happens when
vm.startBroadcast()
is insetUp()
as far as i know.The text was updated successfully, but these errors were encountered: