Deploying contract through Script to Besu Chain fails
Component
Forge
Have you ensured that all of these are up to date?
- [X] Foundry
- [X] Foundryup
What version of Foundry are you on?
forge 0.2.0 (8801156 2024-06-13T00:22:06.739865000Z)
What command(s) is the bug in?
forge script
Operating System
None
Describe the bug
- server returned an error response: error code -32600: 'to' must be a string
^^ when running forge script script/DeployAll.s.sol:DeployAllScript --rpc-url https://.... --broadcast -vvvv --unlocked --sender 0xd0d...
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
import {Script} from 'forge-std/Script.sol';
/*import contracts */
contract DeployAllScript is Script {
function run() public {
vm.startBroadcast();
/* contract names obfucated*/
LimitFeature LF = new LFContract();
EventEmitter EM = new EMContract();
GiftManager GM = new GMContract(address(EM));
TokenManager TM = new TMContract(address(GM));
Shop S = new SContract(address(TM), address(LF), address(EM));
vm.stopBroadcast();
}
}
could you please share an RPC that's being used?
could you please share an RPC that's being used?
Sadly not it's a Private Chain. Is there anything you want me to try?
its being hosted on https://www.kaleido.io
Downgrading to nightly-293fad73670b7b59ca901c7f2105bf7a29165a90 fixes the problem, not sure exactly which version it breaks at, might try a binary search at some point.
Can you run on the latest version with the RUST_LOG=trace environment variable and post the logs right before the error message? It should show the raw request made to the RPC
Hi @miketamis, would you be able to run on the latest version with the RUST_LOG=trace environment variable and post the logs right before the error message?
Hi @miketamis,
Would you mind trying to reproduce this against the latest version of Foundry?
We've recently pushed a related fix: https://github.com/foundry-rs/foundry/pull/9020
per comment above this should be fixed with #9020 please reopen if still an issue for you. thanks!