Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

[BUG] Can't deploy contracts, compiled by solc 0.8.20 and upper #3921

@maxhiker

Description

@maxhiker

Issue

Impossible to deploy solidity-contract, compiled by solc 0.8.20 and upper.

[7f55b5ffb640][24-03-02T14:40:43.079][CpsRunEvm.cpp:189   ][InvokeEvm           ] lock released normally
[7f55b5ffb640][24-03-02T14:40:43.079][CpsRunEvm.cpp:158   ][Run                 ] EVM: Unknown return type, unsuccessful
[7f55b5ffb640][24-03-02T14:40:43.079][ractStorage.cpp:1225][RevertPrevState     ] BEG
[7f55b5ffb640][24-03-02T14:40:43.079][ractStorage.cpp:1225][RevertPrevState     ] END
[7f55b5ffb640][24-03-02T14:40:43.079][CpsExecutor.cpp:285 ][RunFromEvm          ] TxnStatus for failed run: 
[7f55b5ffb640][24-03-02T14:40:43.079][CpsExecutor.cpp:288 ][RunFromEvm          ] Error: invalid code
[7f55b5ffb640][24-03-02T14:40:43.079][ntStoreSCEvm.cpp:325][UpdateAccountsEvm   ] END

Steps to Reproduce

solc-select 0.8.20
solc --bin Storage.sol -o build20
export WEB3_RPC_URL=http://127.0.0.1:5555
export WEB3_PRIVATE_KEY=0xd96e9eb5b782a80ea153c937fa83e5948485fbfc8b7e7c069d7b914dbc350aba
web3 contract deploy build20/Storage.bin
ERROR: Contract deploy tx failed: 0x6e5e22a48ea53f412539e61169678b6920a0fcf1815907023e7a89d30586fd1c. Did you pass in the correct constructor arguments?

Same for versions 0.8.21, 0.8.22, 0.8.23, 0.8.24.
I used github.com/gochain/web3 CLI for simplicity, but result is same when to deploy through github.com/ethereum/go-ethereum library.

Additional Details

Zilliqa version: 9.3.3
Web3 client version: Zilliqa/v8.2

Source solidity contract

// SPDX-License-Identifier: GPL-3.0

pragma solidity >0.7.0 < 0.9.0;
/**
* @title Storage
* @dev store or retrieve variable value
*/

contract Storage {

	uint256 value;

	function store(uint256 number) public{
		value = number;
	}

	function retrieve() public view returns (uint256){
		return value;
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions