foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
7.92k stars 1.6k forks source link

bug(`forge script`): deploying contract to Besu Chain fails #8147

Open miketamis opened 1 month ago

miketamis commented 1 month ago

Component

Forge

Have you ensured that all of these are up to date?

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

^^ 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();
  }
}
klkvr commented 1 month ago

could you please share an RPC that's being used?

miketamis commented 1 month ago

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

miketamis commented 3 weeks ago

Downgrading to nightly-293fad73670b7b59ca901c7f2105bf7a29165a90 fixes the problem, not sure exactly which version it breaks at, might try a binary search at some point.

DaniPopes commented 3 weeks ago

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

zerosnacks commented 5 days ago

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?