0

I am trying to deploy a very simple contract to Sepolia.

Here is the code:

pragma solidity ^0.8.18;

    contract Object {
        bytes32 private UID;
        bytes private Desc;

        constructor(bytes32 _UID, bytes memory _Desc) {
            UID             = _UID;
            Desc            = _Desc;
            }

        function getUID() view public returns (bytes32) {
            return UID;
            }

        function getDesc() view public returns (bytes memory) {
            return Desc;
            }
    }

This compiles fine and appears to work, but when I try and deploy it on Remix on Sepolia (or VM) it does not work. No error message, it just does not deploy.

Is there a problem with the code or is it an issue with Remix?

Thanks.

1
  • 1
    Looks like it doesn't get deployed if you pass the incorrect data types to the constructor. As Ethan mentioned, you can try passing something like that: _UID=0x596f7520676f7420697421000000000000000000000000000000000000000000 _DESC=0x596f7520676f7420697421000000000000000000000000000000000000000000 See this contract instance I deployed form my Sepolia account: 0x98297FDB08B661D9075345E8DCF01f7eAe607c2e
    – Mila A
    Jun 28 at 9:21

1 Answer 1

1

Your code can be deployed, maybe there is a problem with the parameters of the constructor you passed in.

You can try:

_UID = 0xdd440df46537b153fd7dcb3d09fe2d20ab4650728dfc389f4fe51de36a8cab06
_Desc = 0xdd440df46537b153fd7dcb3d09fe2d20ab4650728dfc389f4fe51de36a8cab06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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