forked from TrueCloudLab/frostfs-node
[#421] morph/client: Support native.Role type as contract argument
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
28fb8c971c
commit
b6ca7f1f87
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/native"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
||||
|
@ -219,6 +220,9 @@ func toStackParameter(value interface{}) (sc.Parameter, error) {
|
|||
case util.Uint160:
|
||||
result.Type = sc.ByteArrayType
|
||||
result.Value = v.BytesBE()
|
||||
case native.Role:
|
||||
result.Type = sc.IntegerType
|
||||
result.Value = int64(v)
|
||||
default:
|
||||
return result, errors.Errorf("chain/client: unsupported parameter %v", value)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue