2021-06-01 11:35:53 +00:00
|
|
|
package neofscontract
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
2021-11-09 20:52:29 +00:00
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
2021-06-01 11:35:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Cheque invokes `cheque` method of NeoFS contract.
|
|
|
|
func (x *Client) Cheque(id []byte, user util.Uint160, amount int64, lock util.Uint160) error {
|
2021-11-09 20:52:29 +00:00
|
|
|
prm := client.InvokePrm{}
|
|
|
|
|
|
|
|
prm.SetMethod(x.chequeMethod)
|
|
|
|
prm.SetArgs(id, user.BytesBE(), amount, lock.BytesBE())
|
|
|
|
|
|
|
|
return x.client.Invoke(prm)
|
2021-06-01 11:35:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// AlphabetUpdate update list of alphabet nodes.
|
|
|
|
func (x *Client) AlphabetUpdate(id []byte, pubs keys.PublicKeys) error {
|
2021-11-09 20:52:29 +00:00
|
|
|
prm := client.InvokePrm{}
|
|
|
|
|
|
|
|
prm.SetMethod(x.alphabetUpdateMethod)
|
|
|
|
prm.SetArgs(id, pubs)
|
|
|
|
|
|
|
|
return x.client.Invoke(prm)
|
2021-06-01 11:35:53 +00:00
|
|
|
}
|