Neo: How to push a ContractParameterType of type 'Map' using the script builder?

Created on 11 Dec 2020  路  4Comments  路  Source: neo-project/neo

Hi,

Some of our code has broken because we can't push the Map type using the script builder. What should we do to replace it? Map is still a ContractParameterType, but it can't be pushed to a script using the script builder.

Edit: Maybe this is not the reason our code has broken. I checked the latest changes and I noticed that the map was never there. Not sure what happened.

question

All 4 comments

Use ScriptBuilder.Emit.

NEWMAP
DUP
PUSH <key>
PUSH <value>
APPEND

Thanks mate. Any reason we don't have this in the helper class? (Neo/VM/Helper.cs)

I will create a pr for this tomorrow.

You're amazing, thanks man

Was this page helpful?
0 / 5 - 0 ratings