foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Deploying contract through Script to Besu Chain fails

Open miketamis opened this issue 1 year ago • 4 comments

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();
  }
}

miketamis avatar Jun 13 '24 07:06 miketamis

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

klkvr avatar Jun 14 '24 00:06 klkvr

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 avatar Jun 14 '24 05:06 miketamis

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

miketamis avatar Jun 25 '24 08:06 miketamis

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

DaniPopes avatar Jun 27 '24 14:06 DaniPopes

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?

zerosnacks avatar Jul 16 '24 11:07 zerosnacks

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

zerosnacks avatar Oct 22 '24 11:10 zerosnacks

per comment above this should be fixed with #9020 please reopen if still an issue for you. thanks!

grandizzy avatar Nov 12 '24 10:11 grandizzy