Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue of contract parameter type #357

Closed
ProDog opened this issue Aug 19, 2020 · 5 comments · Fixed by #360
Closed

Issue of contract parameter type #357

ProDog opened this issue Aug 19, 2020 · 5 comments · Fixed by #360

Comments

@ProDog
Copy link
Contributor

ProDog commented Aug 19, 2020

Describe the bug
Execution FAULT when the contract uses the byte[] parameter.

To Reproduce
Contract:

        public static object Test2(byte[] a)
        {
            return a;           
        }

Invoke:

invoke 0x72d660435e3ca79c9ebdd8274db4c2665b7c438a Test2 [{"type":"ByteArray","value":"AQI="}]

Result:

Invoking script with: '0c02010211c00c09626f6f6c54657374320c148a437c5b66c2b44d27d8bd9e9ca73c5e4360d67241627d5b52'
VM State: FAULT
Gas Consumed: 0.0127913
Result Stack: []
Error: Invalid type for SETITEM: ByteString
Error: Invalid type for SETITEM: ByteString

Platform:

  • OS: [Windows 10 x64]
  • Version [neo master]
@Qiao-Jin
Copy link
Contributor

This issue is caused by lack of support of ByteString type by SETITEM opcode (currently only support VMArray, Map and Buffer)

@ProDog
Copy link
Contributor Author

ProDog commented Aug 19, 2020

Then we should support it😀.

@shargon
Copy link
Member

shargon commented Aug 19, 2020

why it requires a setItem if in this code is not needed?

@shargon shargon transferred this issue from neo-project/neo Sep 15, 2020
@shargon shargon mentioned this issue Sep 16, 2020
@shargon
Copy link
Member

shargon commented Sep 16, 2020

@ProDog could you check if it was solved? in #360 it seems that it works

@ProDog
Copy link
Contributor Author

ProDog commented Sep 17, 2020

@ProDog could you check if it was solved? in #360 it seems that it works

Yes, It's been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants