Skip to content

Dry running deployment transaction does not return deployed bytecode #177

@BigTava

Description

@BigTava

Reproduction Steps

  1. repo setup
git clone https://github.com/safe-global/safe-singleton-factory.git
cd ./safe-singleton-factory
npm install @parity/hardhat-polkadot
  1. changes in `hardhat.config.ts
defaultNetwork: "hardhat",
	networks: {
		hardhat: {
			polkadot: { target: true },
			nodeConfig: {
				nodeBinaryPath:
					"/Users/tiago/Projects/polkadot-sdk/target/debug/revive-dev-node",
				rpcPort: 8000,
				dev: true,
			},
			adapterConfig: {
				adapterBinaryPath:
					"/Users/tiago/Projects/polkadot-sdk/target/debug/eth-rpc",
				dev: true,
			},
		},
	},
  1. create the transaction
    npx hardhat node in one terminal
    npm run estimate-compile

  2. submit transaction
    npm run submit

Expected Behavior

{
  deployedBytecode: '0x604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf300',
  codeHash: '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'
}

Contract is deployed successfully

Current Behavior

{
  deployedBytecode: '0x',
  codeHash: '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'
}
Error: deployment transaction reverted

Runtime is generating the deployed bytecode correctly

tokio-runtime-worker runtime::revive: Evm call with bytecode: ExtBytecode { bytecode_hash: None, action: None, base: LegacyAnalyzed(LegacyAnalyzedBytecode { bytecode: 0x604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf300, original_len: 83, jump_table: JumpTable { map: "0000000000000000800000" } }), previous_pointer: None, instruction_pointer: 0x16eed0 }

But the eth-rpc gets empty array

eth-rpc: eth_call dry_run result: EthTransactInfo { gas_required: Weight { ref_time: 630818, proof_size: 0 }, storage_deposit: 100016680000000, eth_gas: 1850108157200047, data: [] }

cc @mordamax

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions