I have a contract called bridgeStacked that uses a library called BytesLib. When I have both loaded into Remix, I compile and deploy bridgeStacked from in Remix. First, I notice that in the log it says

creation of library browser/bridgeStacked.sol:BytesLib pending...

So I don't kno why it includes BytesLib in that. Then nothing shows up under the deployed tab - I have to manually get the tx hash from the log and look at a Ropsten block explorer to get the address of the contract that was created, then load that into the At Address field which correctly loads the right functions in the Deployed Contracts section. Then why I try and call a simple test function:

function test(uint256 _val) public view returns (uint256) {
        return _val;

It returns 0 when I enter 2. If I remove view and make it a write tx, the tx just fails even though it's mined. Similarly fails when called from web3.py.

What's going on here? I think the issue is that the wrong contract is being deployed, but why? :<


It seems like a Remix bug, you can compare the compiled and deploeyd byte code of a smart contract to make sure that the contracts are different.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.