Code to reproduce
I'm writing a Solidity deploy script using Foundry.
- I'm executing the Deploy using this command
forge script script/Deployer.s.sol:DeployerScript --rpc-url http://127.0.0.1:8545 --private-key $env:PRIVATE_KEY --broadcast -vvvvv
github code: fishcake-contracts/script/Deployer.s.sol at main ยท WarriorFromLongAgo/fishcake-contracts (github.com)
- Upgrade investorSalePool contract
forge script script/UpgradeInvestorSalePoolDeployer.s.sol:UpgradeInvestorSalePoolDeployer --rpc-url http://127.0.0.1:8545 --private-key $env:PRIVATE_KEY --broadcast -vvvv
3, deploy err log
== Logs ==
New InvestorSalePool implementation deployed at: 0x0613c549d358fB743037bE6De52E4348AdA96Ad0
proxyAdmin deployed at: 0x5094103dE460dF9BC1A0F2D69d6D6547cc97c050
proxyAdmin owner deployed at: 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
deployerAddress deployed at: 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
run 1 msg.sender deployed at: 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
Error:
script failed: <empty revert data>
4๏ผ deploy err stack
[1458402] UpgradeInvestorSalePoolDeployer::run()
โโ [0] VM::envUint("PRIVATE_KEY") [staticcall]
โ โโ โ [Return] <env var value>
โโ [0] VM::addr(<pk>) [staticcall]
โ โโ โ [Return] 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
โโ [0] VM::startBroadcast(<pk>)
โ โโ โ [Return]
โโ [1394180] โ new InvestorSalePool@0x0613c549d358fB743037bE6De52E4348AdA96Ad0
โ โโ emit Initialized(version: 18446744073709551615 [1.844e19])
โ โโ โ [Return] 6821 bytes of code
โโ [0] console::log("New InvestorSalePool implementation deployed at:", InvestorSalePool: [0x0613c549d358fB743037bE6De52E4348AdA96Ad0]) [staticcall]
โ โโ โ [Stop]
โโ [0] console::log("proxyAdmin deployed at:", 0x5094103dE460dF9BC1A0F2D69d6D6547cc97c050) [staticcall]
โ โโ โ [Stop]
โโ [2298] 0x5094103dE460dF9BC1A0F2D69d6D6547cc97c050::owner() [staticcall]
โ โโ โ [Return] 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
โโ [0] console::log("proxyAdmin owner deployed at:", 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720) [staticcall]
โ โโ โ [Stop]
โโ [0] console::log("deployerAddress deployed at:", 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720) [staticcall]
โ โโ โ [Stop]
โโ [298] 0x5094103dE460dF9BC1A0F2D69d6D6547cc97c050::owner() [staticcall]
โ โโ โ [Return] 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
โโ [0] console::log("run 1 msg.sender deployed at:", 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720) [staticcall]
โ โโ โ [Stop]
โโ [9510] 0x5094103dE460dF9BC1A0F2D69d6D6547cc97c050::upgradeAndCall(0x0D8694F47cDC22Bb8C6D2668a38d07a439F378F9, InvestorSalePool: [0x0613c549d358fB743037bE6De52E4348AdA96Ad0], 0xc4d66de8000000000000000000000000a0ee7a142d267c1f36714e4a8f75612f20a79720)
โ โโ [5568] 0x0D8694F47cDC22Bb8C6D2668a38d07a439F378F9::upgradeToAndCall(InvestorSalePool: [0x0613c549d358fB743037bE6De52E4348AdA96Ad0], 0xc4d66de8000000000000000000000000a0ee7a142d267c1f36714e4a8f75612f20a79720)
โ โ โโ [696] 0xA922C3227149D9bc5001D796aA418b590D0C4a7B::upgradeToAndCall(InvestorSalePool: [0x0613c549d358fB743037bE6De52E4348AdA96Ad0], 0xc4d66de8000000000000000000000000a0ee7a142d267c1f36714e4a8f75612f20a79720) [delegatecall]
โ โ โ โโ โ [Revert] EvmError: Revert
โ โ โโ โ [Revert] EvmError: Revert
โ โโ โ [Revert] EvmError: Revert
โโ โ [Revert] EvmError: Revert
Environment
I'm writing a Solidity deploy script using Foundry.