forked from TrueCloudLab/neoneo-go
Merge pull request #2957 from nspcc-dev/rm-go-17
*: drop go 1.17 support
This commit is contained in:
commit
c053f1a4af
221 changed files with 1302 additions and 1441 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -53,9 +53,9 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: '1.20'
|
||||
cache: true
|
||||
|
||||
- name: Update Go modules
|
||||
|
@ -133,9 +133,9 @@ jobs:
|
|||
|
||||
# For proper `deps` make target execution.
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: '1.20'
|
||||
cache: true
|
||||
|
||||
- name: Login to DockerHub
|
||||
|
|
22
.github/workflows/run_tests.yml
vendored
22
.github/workflows/run_tests.yml
vendored
|
@ -18,9 +18,9 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: '1.20'
|
||||
- uses: actions/checkout@v3
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
|
@ -101,9 +101,9 @@ jobs:
|
|||
git submodule update --init
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: '1.20'
|
||||
cache: true
|
||||
|
||||
- name: Update Go modules
|
||||
|
@ -125,20 +125,20 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, windows-2022, macos-12]
|
||||
go_versions: [ '1.17', '1.18', '1.19' ]
|
||||
go_versions: [ '1.18', '1.19', '1.20' ]
|
||||
exclude:
|
||||
# Only latest Go version for Windows and MacOS.
|
||||
- os: windows-2022
|
||||
go_versions: '1.17'
|
||||
go_versions: '1.18'
|
||||
- os: windows-2022
|
||||
go_versions: '1.18'
|
||||
- os: macos-12
|
||||
go_versions: '1.17'
|
||||
go_versions: '1.19'
|
||||
- os: macos-12
|
||||
go_versions: '1.18'
|
||||
- os: macos-12
|
||||
go_versions: '1.19'
|
||||
# Exclude latest Go version for Ubuntu as Coverage uses it.
|
||||
- os: ubuntu-20.04
|
||||
go_versions: '1.19'
|
||||
go_versions: '1.20'
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -146,7 +146,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '${{ matrix.go_versions }}'
|
||||
cache: true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Builder image
|
||||
# Keep go version in sync with Build GA job.
|
||||
FROM golang:1.18-alpine as builder
|
||||
FROM golang:1.20-alpine as builder
|
||||
|
||||
# Display go version for information purposes.
|
||||
RUN go version
|
||||
|
|
|
@ -43,14 +43,14 @@ RUN $newPath = ('{0}\bin;C:\Program Files\Go\bin;{1}' -f $env:GOPATH, $env:PATH)
|
|||
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine);
|
||||
|
||||
# Keep go version in sync with Build GA job.
|
||||
ENV GOLANG_VERSION=1.19
|
||||
ENV GOLANG_VERSION=1.20
|
||||
|
||||
RUN $url = 'https://go.dev/dl/go1.19.windows-amd64.zip'; \
|
||||
RUN $url = 'https://go.dev/dl/go1.20.windows-amd64.zip'; \
|
||||
Write-Host ('Downloading {0} ...' -f $url); \
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
||||
Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
|
||||
\
|
||||
$sha256 = 'bcaaf966f91980d35ae93c37a8fe890e4ddfca19448c0d9f66c027d287e2823a'; \
|
||||
$sha256 = 'e8f6d8bbcf3df58d2ba29818e13b04c2e42ba2e4d90d580720b21c34d10bbf68'; \
|
||||
Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \
|
||||
if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \
|
||||
Write-Host 'FAILED!'; \
|
||||
|
|
|
@ -51,7 +51,7 @@ NeoGo, `:latest` points to the latest release) or build yourself.
|
|||
|
||||
### Building
|
||||
|
||||
Building NeoGo requires Go 1.17+ and `make`:
|
||||
Building NeoGo requires Go 1.18+ and `make`:
|
||||
|
||||
```
|
||||
make
|
||||
|
|
|
@ -230,9 +230,9 @@ func parseCosigner(c string) (transaction.Signer, error) {
|
|||
}
|
||||
|
||||
// GetDataFromContext returns data parameter from context args.
|
||||
func GetDataFromContext(ctx *cli.Context) (int, interface{}, *cli.ExitError) {
|
||||
func GetDataFromContext(ctx *cli.Context) (int, any, *cli.ExitError) {
|
||||
var (
|
||||
data interface{}
|
||||
data any
|
||||
offset int
|
||||
params []smartcontract.Parameter
|
||||
err error
|
||||
|
|
|
@ -662,7 +662,7 @@ func initBlockChain(cfg config.Config, log *zap.Logger) (*core.Blockchain, stora
|
|||
chain, err := core.NewBlockchain(store, cfg.Blockchain(), log)
|
||||
if err != nil {
|
||||
errText := "could not initialize blockchain: %w"
|
||||
errArgs := []interface{}{err}
|
||||
errArgs := []any{err}
|
||||
closeErr := store.Close()
|
||||
if closeErr != nil {
|
||||
errText += "; failed to close the DB: %w"
|
||||
|
|
|
@ -187,7 +187,7 @@ func Zum(typev int, typev_ int, funcv int) int {
|
|||
}
|
||||
|
||||
// JustExecute invokes ` + "`justExecute`" + ` method of contract.
|
||||
func JustExecute(arr []interface{}) {
|
||||
func JustExecute(arr []any) {
|
||||
neogointernal.CallWithTokenNoRet(Hash, "justExecute", int(contract.All), arr)
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ func GetPublicKey() interop.PublicKey {
|
|||
}
|
||||
|
||||
// OtherTypes invokes ` + "`otherTypes`" + ` method of contract.
|
||||
func OtherTypes(ctr interop.Hash160, tx interop.Hash256, sig interop.Signature, data interface{}) bool {
|
||||
func OtherTypes(ctr interop.Hash160, tx interop.Hash256, sig interop.Signature, data any) bool {
|
||||
return neogointernal.CallWithToken(Hash, "otherTypes", int(contract.All), ctr, tx, sig, data).(bool)
|
||||
}
|
||||
|
||||
|
@ -212,8 +212,8 @@ func GetFromMap(intMap map[string]int, indices []string) []int {
|
|||
}
|
||||
|
||||
// DoSomething invokes ` + "`doSomething`" + ` method of contract.
|
||||
func DoSomething(bytes []byte, str string) interface{} {
|
||||
return neogointernal.CallWithToken(Hash, "doSomething", int(contract.ReadStates), bytes, str).(interface{})
|
||||
func DoSomething(bytes []byte, str string) any {
|
||||
return neogointernal.CallWithToken(Hash, "doSomething", int(contract.ReadStates), bytes, str).(any)
|
||||
}
|
||||
|
||||
// GetBlockWrapper invokes ` + "`getBlockWrapper`" + ` method of contract.
|
||||
|
@ -303,7 +303,7 @@ var Hash = util.Uint160{0x4, 0x8, 0x15, 0x16, 0x23, 0x42, 0x43, 0x44, 0x0, 0x1,
|
|||
|
||||
// Invoker is used by ContractReader to call various safe methods.
|
||||
type Invoker interface {
|
||||
Call(contract util.Uint160, operation string, params ...interface{}) (*result.Invoke, error)
|
||||
Call(contract util.Uint160, operation string, params ...any) (*result.Invoke, error)
|
||||
}
|
||||
|
||||
// ContractReader implements safe contract methods.
|
||||
|
|
|
@ -19,7 +19,7 @@ const (
|
|||
permMethodKey = "methods"
|
||||
)
|
||||
|
||||
func (p permission) MarshalYAML() (interface{}, error) {
|
||||
func (p permission) MarshalYAML() (any, error) {
|
||||
m := yaml.Node{Kind: yaml.MappingNode}
|
||||
switch p.Contract.Type {
|
||||
case manifest.PermissionWildcard:
|
||||
|
@ -36,7 +36,7 @@ func (p permission) MarshalYAML() (interface{}, error) {
|
|||
return nil, fmt.Errorf("invalid permission type: %d", p.Contract.Type)
|
||||
}
|
||||
|
||||
var val interface{} = "*"
|
||||
var val any = "*"
|
||||
if !p.Methods.IsWildcard() {
|
||||
val = p.Methods.Value
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ func (p permission) MarshalYAML() (interface{}, error) {
|
|||
return m, nil
|
||||
}
|
||||
|
||||
func (p *permission) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
var m map[string]interface{}
|
||||
func (p *permission) UnmarshalYAML(unmarshal func(any) error) error {
|
||||
var m map[string]any
|
||||
if err := unmarshal(&m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ func (p *permission) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|||
return p.fillMethods(m)
|
||||
}
|
||||
|
||||
func (p *permission) fillType(m map[string]interface{}) error {
|
||||
func (p *permission) fillType(m map[string]any) error {
|
||||
vh, ok1 := m[permHashKey]
|
||||
vg, ok2 := m[permGroupKey]
|
||||
switch {
|
||||
|
@ -104,7 +104,7 @@ func (p *permission) fillType(m map[string]interface{}) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (p *permission) fillMethods(m map[string]interface{}) error {
|
||||
func (p *permission) fillMethods(m map[string]any) error {
|
||||
methods, ok := m[permMethodKey]
|
||||
if !ok {
|
||||
return errors.New("'methods' field is missing from permission")
|
||||
|
@ -116,7 +116,7 @@ func (p *permission) fillMethods(m map[string]interface{}) error {
|
|||
p.Methods.Value = nil
|
||||
return nil
|
||||
}
|
||||
case []interface{}:
|
||||
case []any:
|
||||
ms := make([]string, len(mt))
|
||||
for i := range mt {
|
||||
ms[i], ok = mt[i].(string)
|
||||
|
|
|
@ -81,7 +81,7 @@ func init() {
|
|||
}
|
||||
|
||||
// RuntimeNotify sends runtime notification with "Hello world!" name
|
||||
func RuntimeNotify(args []interface{}) {
|
||||
func RuntimeNotify(args []any) {
|
||||
runtime.Notify(notificationName, args)
|
||||
}`
|
||||
)
|
||||
|
@ -495,7 +495,7 @@ func invokeInternal(ctx *cli.Context, signAndPush bool) error {
|
|||
err error
|
||||
exitErr *cli.ExitError
|
||||
operation string
|
||||
params []interface{}
|
||||
params []any
|
||||
paramsStart = 1
|
||||
scParams []smartcontract.Parameter
|
||||
cosigners []transaction.Signer
|
||||
|
@ -521,7 +521,7 @@ func invokeInternal(ctx *cli.Context, signAndPush bool) error {
|
|||
if err != nil {
|
||||
return cli.NewExitError(err, 1)
|
||||
}
|
||||
params = make([]interface{}, len(scParams))
|
||||
params = make([]any, len(scParams))
|
||||
for i := range scParams {
|
||||
params[i] = scParams[i]
|
||||
}
|
||||
|
@ -548,7 +548,7 @@ func invokeInternal(ctx *cli.Context, signAndPush bool) error {
|
|||
return invokeWithArgs(ctx, acc, w, script, operation, params, cosigners)
|
||||
}
|
||||
|
||||
func invokeWithArgs(ctx *cli.Context, acc *wallet.Account, wall *wallet.Wallet, script util.Uint160, operation string, params []interface{}, cosigners []transaction.Signer) error {
|
||||
func invokeWithArgs(ctx *cli.Context, acc *wallet.Account, wall *wallet.Wallet, script util.Uint160, operation string, params []any, cosigners []transaction.Signer) error {
|
||||
var (
|
||||
err error
|
||||
signersAccounts []actor.SignerAccount
|
||||
|
@ -787,7 +787,7 @@ func contractDeploy(ctx *cli.Context) error {
|
|||
return cli.NewExitError(fmt.Errorf("failed to read manifest file: %w", err), 1)
|
||||
}
|
||||
|
||||
var appCallParams = []interface{}{f, manifestBytes}
|
||||
var appCallParams = []any{f, manifestBytes}
|
||||
|
||||
signOffset, data, err := cmdargs.ParseParams(ctx.Args(), true)
|
||||
if err != nil {
|
||||
|
|
|
@ -51,7 +51,7 @@ func init() {
|
|||
}
|
||||
|
||||
// RuntimeNotify sends runtime notification with "Hello world!" name
|
||||
func RuntimeNotify(args []interface{}) {
|
||||
func RuntimeNotify(args []any) {
|
||||
runtime.Notify(notificationName, args)
|
||||
}`, string(main))
|
||||
|
||||
|
|
8
cli/smartcontract/testdata/deploy/main.go
vendored
8
cli/smartcontract/testdata/deploy/main.go
vendored
|
@ -13,7 +13,7 @@ var key = "key"
|
|||
|
||||
const mgmtKey = "mgmt"
|
||||
|
||||
func _deploy(data interface{}, isUpdate bool) {
|
||||
func _deploy(data any, isUpdate bool) {
|
||||
var value string
|
||||
|
||||
ctx := storage.GetContext()
|
||||
|
@ -25,7 +25,7 @@ func _deploy(data interface{}, isUpdate bool) {
|
|||
storage.Put(ctx, mgmtKey, sh)
|
||||
|
||||
if data != nil {
|
||||
arr := data.([]interface{})
|
||||
arr := data.([]any)
|
||||
for i := 0; i < len(arr)-1; i += 2 {
|
||||
storage.Put(ctx, arr[i], arr[i+1])
|
||||
}
|
||||
|
@ -70,12 +70,12 @@ func GetValueWithKey(key string) string {
|
|||
}
|
||||
|
||||
// TestFind finds items with the specified prefix.
|
||||
func TestFind(f storage.FindFlags) []interface{} {
|
||||
func TestFind(f storage.FindFlags) []any {
|
||||
ctx := storage.GetContext()
|
||||
storage.Put(ctx, "findkey1", "value1")
|
||||
storage.Put(ctx, "findkey2", "value2")
|
||||
|
||||
var result []interface{}
|
||||
var result []any
|
||||
iter := storage.Find(ctx, "findkey", f)
|
||||
for iterator.Next(iter) {
|
||||
result = append(result, iterator.Value(iter))
|
||||
|
|
2
cli/smartcontract/testdata/deploy/sub/put.go
vendored
2
cli/smartcontract/testdata/deploy/sub/put.go
vendored
|
@ -4,7 +4,7 @@ import "github.com/nspcc-dev/neo-go/pkg/interop/storage"
|
|||
|
||||
var Key = "sub"
|
||||
|
||||
func _deploy(data interface{}, isUpdate bool) {
|
||||
func _deploy(data any, isUpdate bool) {
|
||||
ctx := storage.GetContext()
|
||||
value := "sub create"
|
||||
if isUpdate {
|
||||
|
|
12
cli/smartcontract/testdata/nameservice/nns.go
vendored
12
cli/smartcontract/testdata/nameservice/nns.go
vendored
|
@ -27,11 +27,11 @@ type Actor interface {
|
|||
|
||||
nep11.Actor
|
||||
|
||||
MakeCall(contract util.Uint160, method string, params ...interface{}) (*transaction.Transaction, error)
|
||||
MakeCall(contract util.Uint160, method string, params ...any) (*transaction.Transaction, error)
|
||||
MakeRun(script []byte) (*transaction.Transaction, error)
|
||||
MakeUnsignedCall(contract util.Uint160, method string, attrs []transaction.Attribute, params ...interface{}) (*transaction.Transaction, error)
|
||||
MakeUnsignedCall(contract util.Uint160, method string, attrs []transaction.Attribute, params ...any) (*transaction.Transaction, error)
|
||||
MakeUnsignedRun(script []byte, attrs []transaction.Attribute) (*transaction.Transaction, error)
|
||||
SendCall(contract util.Uint160, method string, params ...interface{}) (util.Uint256, uint32, error)
|
||||
SendCall(contract util.Uint160, method string, params ...any) (util.Uint256, uint32, error)
|
||||
SendRun(script []byte) (util.Uint256, uint32, error)
|
||||
}
|
||||
|
||||
|
@ -155,14 +155,14 @@ func (c *Contract) AddRootUnsigned(root string) (*transaction.Transaction, error
|
|||
// SetPrice creates a transaction invoking `setPrice` method of the contract.
|
||||
// This transaction is signed and immediately sent to the network.
|
||||
// The values returned are its hash, ValidUntilBlock value and error if any.
|
||||
func (c *Contract) SetPrice(priceList []interface{}) (util.Uint256, uint32, error) {
|
||||
func (c *Contract) SetPrice(priceList []any) (util.Uint256, uint32, error) {
|
||||
return c.actor.SendCall(Hash, "setPrice", priceList)
|
||||
}
|
||||
|
||||
// SetPriceTransaction creates a transaction invoking `setPrice` method of the contract.
|
||||
// This transaction is signed, but not sent to the network, instead it's
|
||||
// returned to the caller.
|
||||
func (c *Contract) SetPriceTransaction(priceList []interface{}) (*transaction.Transaction, error) {
|
||||
func (c *Contract) SetPriceTransaction(priceList []any) (*transaction.Transaction, error) {
|
||||
return c.actor.MakeCall(Hash, "setPrice", priceList)
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ func (c *Contract) SetPriceTransaction(priceList []interface{}) (*transaction.Tr
|
|||
// This transaction is not signed, it's simply returned to the caller.
|
||||
// Any fields of it that do not affect fees can be changed (ValidUntilBlock,
|
||||
// Nonce), fee values (NetworkFee, SystemFee) can be increased as well.
|
||||
func (c *Contract) SetPriceUnsigned(priceList []interface{}) (*transaction.Transaction, error) {
|
||||
func (c *Contract) SetPriceUnsigned(priceList []any) (*transaction.Transaction, error) {
|
||||
return c.actor.MakeUnsignedCall(Hash, "setPrice", nil, priceList)
|
||||
}
|
||||
|
||||
|
|
12
cli/smartcontract/testdata/nex/nex.go
vendored
12
cli/smartcontract/testdata/nex/nex.go
vendored
|
@ -24,11 +24,11 @@ type Actor interface {
|
|||
|
||||
nep17.Actor
|
||||
|
||||
MakeCall(contract util.Uint160, method string, params ...interface{}) (*transaction.Transaction, error)
|
||||
MakeCall(contract util.Uint160, method string, params ...any) (*transaction.Transaction, error)
|
||||
MakeRun(script []byte) (*transaction.Transaction, error)
|
||||
MakeUnsignedCall(contract util.Uint160, method string, attrs []transaction.Attribute, params ...interface{}) (*transaction.Transaction, error)
|
||||
MakeUnsignedCall(contract util.Uint160, method string, attrs []transaction.Attribute, params ...any) (*transaction.Transaction, error)
|
||||
MakeUnsignedRun(script []byte, attrs []transaction.Attribute) (*transaction.Transaction, error)
|
||||
SendCall(contract util.Uint160, method string, params ...interface{}) (util.Uint256, uint32, error)
|
||||
SendCall(contract util.Uint160, method string, params ...any) (util.Uint256, uint32, error)
|
||||
SendRun(script []byte) (util.Uint256, uint32, error)
|
||||
}
|
||||
|
||||
|
@ -168,14 +168,14 @@ func (c *Contract) MaxSupplyUnsigned() (*transaction.Transaction, error) {
|
|||
// Mint creates a transaction invoking `mint` method of the contract.
|
||||
// This transaction is signed and immediately sent to the network.
|
||||
// The values returned are its hash, ValidUntilBlock value and error if any.
|
||||
func (c *Contract) Mint(from util.Uint160, to util.Uint160, amount *big.Int, swapId *big.Int, signature []byte, data interface{}) (util.Uint256, uint32, error) {
|
||||
func (c *Contract) Mint(from util.Uint160, to util.Uint160, amount *big.Int, swapId *big.Int, signature []byte, data any) (util.Uint256, uint32, error) {
|
||||
return c.actor.SendCall(Hash, "mint", from, to, amount, swapId, signature, data)
|
||||
}
|
||||
|
||||
// MintTransaction creates a transaction invoking `mint` method of the contract.
|
||||
// This transaction is signed, but not sent to the network, instead it's
|
||||
// returned to the caller.
|
||||
func (c *Contract) MintTransaction(from util.Uint160, to util.Uint160, amount *big.Int, swapId *big.Int, signature []byte, data interface{}) (*transaction.Transaction, error) {
|
||||
func (c *Contract) MintTransaction(from util.Uint160, to util.Uint160, amount *big.Int, swapId *big.Int, signature []byte, data any) (*transaction.Transaction, error) {
|
||||
return c.actor.MakeCall(Hash, "mint", from, to, amount, swapId, signature, data)
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ func (c *Contract) MintTransaction(from util.Uint160, to util.Uint160, amount *b
|
|||
// This transaction is not signed, it's simply returned to the caller.
|
||||
// Any fields of it that do not affect fees can be changed (ValidUntilBlock,
|
||||
// Nonce), fee values (NetworkFee, SystemFee) can be increased as well.
|
||||
func (c *Contract) MintUnsigned(from util.Uint160, to util.Uint160, amount *big.Int, swapId *big.Int, signature []byte, data interface{}) (*transaction.Transaction, error) {
|
||||
func (c *Contract) MintUnsigned(from util.Uint160, to util.Uint160, amount *big.Int, swapId *big.Int, signature []byte, data any) (*transaction.Transaction, error) {
|
||||
return c.actor.MakeUnsignedCall(Hash, "mint", nil, from, to, amount, swapId, signature, data)
|
||||
}
|
||||
|
||||
|
|
4
cli/smartcontract/testdata/nonepiter/iter.go
vendored
4
cli/smartcontract/testdata/nonepiter/iter.go
vendored
|
@ -14,8 +14,8 @@ var Hash = util.Uint160{0x33, 0x22, 0x11, 0x0, 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xa
|
|||
|
||||
// Invoker is used by ContractReader to call various safe methods.
|
||||
type Invoker interface {
|
||||
Call(contract util.Uint160, operation string, params ...interface{}) (*result.Invoke, error)
|
||||
CallAndExpandIterator(contract util.Uint160, method string, maxItems int, params ...interface{}) (*result.Invoke, error)
|
||||
Call(contract util.Uint160, operation string, params ...any) (*result.Invoke, error)
|
||||
CallAndExpandIterator(contract util.Uint160, method string, maxItems int, params ...any) (*result.Invoke, error)
|
||||
TerminateSession(sessionID uuid.UUID) error
|
||||
TraverseIterator(sessionID uuid.UUID, iterator *result.Iterator, num int) ([]stackitem.Item, error)
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ type LedgerTransactionSigner struct {
|
|||
// LedgerWitnessCondition is a contract-specific ledger.WitnessCondition type used by its methods.
|
||||
type LedgerWitnessCondition struct {
|
||||
Type *big.Int
|
||||
Value interface{}
|
||||
Value any
|
||||
}
|
||||
|
||||
// LedgerWitnessRule is a contract-specific ledger.WitnessRule type used by its methods.
|
||||
|
@ -114,7 +114,7 @@ type ManagementManifest struct {
|
|||
ABI *ManagementABI
|
||||
Permissions []*ManagementPermission
|
||||
Trusts []util.Uint160
|
||||
Extra interface{}
|
||||
Extra any
|
||||
}
|
||||
|
||||
// ManagementMethod is a contract-specific management.Method type used by its methods.
|
||||
|
@ -156,7 +156,7 @@ type StructsInternal struct {
|
|||
}
|
||||
// Invoker is used by ContractReader to call various safe methods.
|
||||
type Invoker interface {
|
||||
Call(contract util.Uint160, operation string, params ...interface{}) (*result.Invoke, error)
|
||||
Call(contract util.Uint160, operation string, params ...any) (*result.Invoke, error)
|
||||
}
|
||||
|
||||
// ContractReader implements safe contract methods.
|
||||
|
|
|
@ -18,7 +18,7 @@ var Hash = util.Uint160{0x33, 0x22, 0x11, 0x0, 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xa
|
|||
|
||||
// Invoker is used by ContractReader to call various safe methods.
|
||||
type Invoker interface {
|
||||
Call(contract util.Uint160, operation string, params ...interface{}) (*result.Invoke, error)
|
||||
Call(contract util.Uint160, operation string, params ...any) (*result.Invoke, error)
|
||||
}
|
||||
|
||||
// ContractReader implements safe contract methods.
|
||||
|
@ -91,8 +91,8 @@ func (c *ContractReader) AAAStrings(s [][][]string) ([][][]string, error) {
|
|||
}
|
||||
|
||||
// Any invokes `any` method of contract.
|
||||
func (c *ContractReader) Any(a interface{}) (interface{}, error) {
|
||||
return func (item stackitem.Item, err error) (interface{}, error) {
|
||||
func (c *ContractReader) Any(a any) (any, error) {
|
||||
return func (item stackitem.Item, err error) (any, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
2
cli/smartcontract/testdata/types/types.go
vendored
2
cli/smartcontract/testdata/types/types.go
vendored
|
@ -20,7 +20,7 @@ func String(s string) string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func Any(a interface{}) interface{} {
|
||||
func Any(a any) any {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
4
cli/smartcontract/testdata/verify.go
vendored
4
cli/smartcontract/testdata/verify.go
vendored
|
@ -9,12 +9,12 @@ func Verify() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data any) {
|
||||
}
|
||||
|
||||
// OnNEP11Payment notifies about NEP-11 payment. You don't call this method directly,
|
||||
// instead it's called by NEP-11 contract when you transfer funds from your address
|
||||
// to the address of this NFT contract.
|
||||
func OnNEP11Payment(from interop.Hash160, amount int, token []byte, data interface{}) {
|
||||
func OnNEP11Payment(from interop.Hash160, amount int, token []byte, data any) {
|
||||
runtime.Notify("OnNEP11Payment", from, amount, token, data)
|
||||
}
|
||||
|
|
|
@ -12,11 +12,11 @@ var Hash = util.Uint160{0x33, 0x22, 0x11, 0x0, 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xa
|
|||
|
||||
// Actor is used by Contract to call state-changing methods.
|
||||
type Actor interface {
|
||||
MakeCall(contract util.Uint160, method string, params ...interface{}) (*transaction.Transaction, error)
|
||||
MakeCall(contract util.Uint160, method string, params ...any) (*transaction.Transaction, error)
|
||||
MakeRun(script []byte) (*transaction.Transaction, error)
|
||||
MakeUnsignedCall(contract util.Uint160, method string, attrs []transaction.Attribute, params ...interface{}) (*transaction.Transaction, error)
|
||||
MakeUnsignedCall(contract util.Uint160, method string, attrs []transaction.Attribute, params ...any) (*transaction.Transaction, error)
|
||||
MakeUnsignedRun(script []byte, attrs []transaction.Attribute) (*transaction.Transaction, error)
|
||||
SendCall(contract util.Uint160, method string, params ...interface{}) (util.Uint256, uint32, error)
|
||||
SendCall(contract util.Uint160, method string, params ...any) (util.Uint256, uint32, error)
|
||||
SendRun(script []byte) (util.Uint256, uint32, error)
|
||||
}
|
||||
|
||||
|
|
|
@ -483,7 +483,7 @@ func NewWithConfig(printLogotype bool, onExit func(int), c *readline.Config, cfg
|
|||
shell: ctl,
|
||||
}
|
||||
|
||||
vmcli.shell.Metadata = map[string]interface{}{
|
||||
vmcli.shell.Metadata = map[string]any{
|
||||
chainKey: chain,
|
||||
chainCfgKey: cfg,
|
||||
icKey: ic,
|
||||
|
|
|
@ -180,9 +180,9 @@ func (e *executor) checkError(t *testing.T, expectedErr error) {
|
|||
require.True(t, strings.HasPrefix(line, expected), fmt.Errorf("expected `%s`, got `%s`", expected, line))
|
||||
}
|
||||
|
||||
func (e *executor) checkStack(t *testing.T, items ...interface{}) {
|
||||
func (e *executor) checkStack(t *testing.T, items ...any) {
|
||||
d := json.NewDecoder(e.out)
|
||||
var actual interface{}
|
||||
var actual any
|
||||
require.NoError(t, d.Decode(&actual))
|
||||
rawActual, err := json.Marshal(actual)
|
||||
require.NoError(t, err)
|
||||
|
@ -210,7 +210,7 @@ func (e *executor) checkEvents(t *testing.T, isKeywordExpected bool, events ...s
|
|||
e.checkNextLine(t, "Events:")
|
||||
}
|
||||
d := json.NewDecoder(e.out)
|
||||
var actual interface{}
|
||||
var actual any
|
||||
require.NoError(t, d.Decode(&actual))
|
||||
rawActual, err := json.Marshal(actual)
|
||||
require.NoError(t, err)
|
||||
|
@ -249,9 +249,9 @@ func (e *executor) checkChange(t *testing.T, c storageChange) {
|
|||
}
|
||||
}
|
||||
|
||||
func (e *executor) checkSlot(t *testing.T, items ...interface{}) {
|
||||
func (e *executor) checkSlot(t *testing.T, items ...any) {
|
||||
d := json.NewDecoder(e.out)
|
||||
var actual interface{}
|
||||
var actual any
|
||||
require.NoError(t, d.Decode(&actual))
|
||||
rawActual, err := json.Marshal(actual)
|
||||
require.NoError(t, err)
|
||||
|
@ -376,7 +376,7 @@ func TestLoad(t *testing.T) {
|
|||
require.NoError(t, os.WriteFile(filenameErr, []byte(src+"invalid_token"), os.ModePerm))
|
||||
filenameErr = "'" + filenameErr + "'"
|
||||
goMod := []byte(`module test.example/vmcli
|
||||
go 1.17`)
|
||||
go 1.18`)
|
||||
require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm))
|
||||
|
||||
e := newTestVMCLI(t)
|
||||
|
@ -407,7 +407,7 @@ require (
|
|||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0
|
||||
)
|
||||
replace github.com/nspcc-dev/neo-go/pkg/interop => ` + filepath.Join(wd, "../../pkg/interop") + `
|
||||
go 1.17`)
|
||||
go 1.18`)
|
||||
require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm))
|
||||
return filename
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ func TestRunWithDifferentArguments(t *testing.T) {
|
|||
func GetString(arg string) string {
|
||||
return arg
|
||||
}
|
||||
func GetArr(arg []interface{}) []interface{}{
|
||||
func GetArr(arg []any) []any{
|
||||
return arg
|
||||
}`
|
||||
|
||||
|
@ -933,7 +933,7 @@ func TestEvents(t *testing.T) {
|
|||
script := io.NewBufBinWriter()
|
||||
h, err := e.cli.chain.GetContractScriptHash(2) // examples/runtime/runtime.go
|
||||
require.NoError(t, err)
|
||||
emit.AppCall(script.BinWriter, h, "notify", callflag.All, []interface{}{true, 5})
|
||||
emit.AppCall(script.BinWriter, h, "notify", callflag.All, []any{true, 5})
|
||||
e.runProg(t,
|
||||
"loadhex "+hex.EncodeToString(script.Bytes()),
|
||||
"run",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/engine
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/events
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/iterator
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
)
|
||||
|
||||
// _deploy primes contract's storage with some data to be used later.
|
||||
func _deploy(_ interface{}, _ bool) {
|
||||
func _deploy(_ any, _ bool) {
|
||||
ctx := storage.GetContext() // RW context.
|
||||
storage.Put(ctx, "foo1", "1")
|
||||
storage.Put(ctx, "foo2", "2")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/nft
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -172,7 +172,7 @@ func tokensOf(ctx storage.Context, holder interop.Hash160) iterator.Iterator {
|
|||
|
||||
// Transfer token from its owner to another user, if there's one owner of the token.
|
||||
// It will return false if token is shared between multiple owners.
|
||||
func Transfer(to interop.Hash160, token []byte, data interface{}) bool {
|
||||
func Transfer(to interop.Hash160, token []byte, data any) bool {
|
||||
if len(to) != interop.Hash160Len {
|
||||
panic("invalid 'to' address")
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ func Transfer(to interop.Hash160, token []byte, data interface{}) bool {
|
|||
}
|
||||
|
||||
// postTransfer emits Transfer event and calls onNEP11Payment if needed.
|
||||
func postTransfer(from interop.Hash160, to interop.Hash160, token []byte, amount int, data interface{}) {
|
||||
func postTransfer(from interop.Hash160, to interop.Hash160, token []byte, amount int, data any) {
|
||||
runtime.Notify("Transfer", from, to, amount, token)
|
||||
if management.GetContract(to) != nil {
|
||||
contract.Call(to, "onNEP11Payment", contract.All, from, amount, token, data)
|
||||
|
@ -263,7 +263,7 @@ func isTokenValid(ctx storage.Context, tokenID []byte) bool {
|
|||
|
||||
// TransferDivisible token from its owner to another user, notice that it only has three
|
||||
// parameters because token owner can be deduced from token ID itself.
|
||||
func TransferDivisible(from, to interop.Hash160, amount int, token []byte, data interface{}) bool {
|
||||
func TransferDivisible(from, to interop.Hash160, amount int, token []byte, data any) bool {
|
||||
if len(from) != interop.Hash160Len {
|
||||
panic("invalid 'from' address")
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ func removeOwner(ctx storage.Context, token []byte, holder interop.Hash160) {
|
|||
// OnNEP17Payment mints tokens if at least 10 GAS is provided. You don't call
|
||||
// this method directly, instead it's called by GAS contract when you transfer
|
||||
// GAS from your address to the address of this NFT contract.
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data any) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
runtime.Log(r.(string))
|
||||
|
@ -364,7 +364,7 @@ func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {
|
|||
if amount < 10_00000000 {
|
||||
panic("minting NFSO costs at least 10 GAS")
|
||||
}
|
||||
tokenInfo := data.([]interface{})
|
||||
tokenInfo := data.([]any)
|
||||
if len(tokenInfo) != 2 {
|
||||
panic("invalid 'data'")
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/nft-nd-nns
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/nspcc-dev/neo-go v0.99.5-0.20221108145959-8746d9877eb5
|
||||
|
|
|
@ -33,44 +33,18 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
|
|||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/CityOfZion/neo-go v0.62.1-pre.0.20191114145240-e740fbe708f8/go.mod h1:MJCkWUBhi9pn/CrYO1Q3P687y2KeahrOPS9BD9LDGb0=
|
||||
github.com/CityOfZion/neo-go v0.70.1-pre.0.20191209120015-fccb0085941e/go.mod h1:0enZl0az8xA6PVkwzEOwPWVJGqlt/GO4hA4kmQ5Xzig=
|
||||
github.com/CityOfZion/neo-go v0.70.1-pre.0.20191212173117-32ac01130d4c/go.mod h1:JtlHfeqLywZLswKIKFnAp+yzezY4Dji9qlfQKB2OD/I=
|
||||
github.com/CityOfZion/neo-go v0.71.1-pre.0.20200129171427-f773ec69fb84/go.mod h1:FLI526IrRWHmcsO+mHsCbj64pJZhwQFTLJZu+A4PGOA=
|
||||
github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA=
|
||||
github.com/abiosoft/ishell v2.0.0+incompatible/go.mod h1:HQR9AqF2R3P4XXpMpI0NAzgHf/aS6+zVXRj14cVk9qg=
|
||||
github.com/abiosoft/ishell/v2 v2.0.2/go.mod h1:E4oTCXfo6QjoCart0QYa5m9w4S+deXs/P/9jA77A9Bs=
|
||||
github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db/go.mod h1:rB3B4rKii8V21ydCbIzH5hZiCQE7f5E9SzUb/ZZx530=
|
||||
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
|
||||
github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521073959-f0d4d129b7f1/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
|
||||
github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA=
|
||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
||||
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o=
|
||||
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
|
||||
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
|
||||
github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I=
|
||||
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
||||
github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
|
||||
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
|
@ -80,36 +54,23 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
|
|||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc=
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
|
||||
github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||
github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:rZfgFAXFS/z/lEd6LJmf9HVZ1LkgYiHx5pHhV5DR16M=
|
||||
github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
|
@ -121,9 +82,7 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9
|
|||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
||||
github.com/go-redis/redis v6.10.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
|
@ -136,7 +95,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
|
|||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
|
@ -154,10 +112,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
|||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
|
||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
|
@ -169,9 +125,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
|
@ -183,14 +137,12 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf
|
|||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
|
||||
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
|
||||
|
@ -199,12 +151,8 @@ github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM
|
|||
github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
|
@ -213,28 +161,15 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X
|
|||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
|
||||
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
|
@ -242,60 +177,33 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
|
|||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
||||
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
||||
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20191205084618-dacb1a30c254/go.mod h1:w1Ln2aT+dBlPhLnuZhBV+DfPEdS2CHWWLp5JTScY3bw=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20191209120240-0d6b7568d9ae/go.mod h1:3FjXOoHmA51EGfb5GS/HOv7VdmngNRTssSeQ729dvGY=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20200117124306-478e5cfbf03a/go.mod h1:/YFK+XOxxg0Bfm6P92lY5eDSLYfp06XOdL8KAVgXjVk=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20200219114139-199d286ed6c1/go.mod h1:O0qtn62prQSqizzoagHmuuKoz8QMkU3SzBoKdEvm3aQ=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20221020093431-31c1bbdc74f2 h1:2soBy8en5W4/1Gvbog8RyVpEbarGWZwPxppZjffWzZE=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20221020093431-31c1bbdc74f2/go.mod h1:g9xisXmX9NP9MjioaTe862n9SlZTrP+6PVUWLBYOr98=
|
||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20210915112629-e1b6cce73d02/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U=
|
||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 h1:n4ZaFCKt1pQJd7PXoMJabZWK9ejjbLOVrkl/lOUmshg=
|
||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U=
|
||||
github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y=
|
||||
github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU=
|
||||
github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1:pPYwPZ2ks+uMnlRLUyXOpLieaDQSEaf4NM3zHVbRjmg=
|
||||
github.com/nspcc-dev/neo-go v0.98.0/go.mod h1:E3cc1x6RXSXrJb2nDWXTXjnXk3rIqVN8YdFyWv+FrqM=
|
||||
github.com/nspcc-dev/neo-go v0.99.5-0.20221108145959-8746d9877eb5 h1:NCIUxkLRB3ovLzM1lvQA6wBNn8fuY7dQx4cMJKLuaAs=
|
||||
github.com/nspcc-dev/neo-go v0.99.5-0.20221108145959-8746d9877eb5/go.mod h1:aWrWJZBYO+9kYC4+qJXvEjySW1WIyPnrHpmdrzd5mJY=
|
||||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220927123257-24c107e3a262/go.mod h1:23bBw0v6pBYcrWs8CBEEDIEDJNbcFoIh8pGGcf2Vv8s=
|
||||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb h1:GFxfkpXEYAbMIr69JpKOsQWeLOaGrd49HNAor8uDW+A=
|
||||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb/go.mod h1:23bBw0v6pBYcrWs8CBEEDIEDJNbcFoIh8pGGcf2Vv8s=
|
||||
github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs=
|
||||
github.com/nspcc-dev/neofs-api-go/v2 v2.11.1 h1:SVqc523pZsSaS9vnPS1mm3VV6b6xY0gvdA0uYJ/GWZQ=
|
||||
github.com/nspcc-dev/neofs-api-go/v2 v2.11.1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs=
|
||||
github.com/nspcc-dev/neofs-crypto v0.2.0/go.mod h1:F/96fUzPM3wR+UGsPi3faVNmFlA9KAEAUQR7dMxZmNA=
|
||||
github.com/nspcc-dev/neofs-crypto v0.2.3/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw=
|
||||
github.com/nspcc-dev/neofs-crypto v0.3.0/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw=
|
||||
github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4=
|
||||
github.com/nspcc-dev/neofs-crypto v0.4.0/go.mod h1:6XJ8kbXgOfevbI2WMruOtI+qUJXNwSGM/E9eClXxPHs=
|
||||
github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211201182451-a5b61c4f6477/go.mod h1:dfMtQWmBHYpl9Dez23TGtIUKiFvCIxUZq/CkSIhEpz4=
|
||||
github.com/nspcc-dev/neofs-sdk-go v0.0.0-20220113123743-7f3162110659 h1:rpMCoRa7expLc9gMiOP724gz6YSykZzmMALR/CmiwnU=
|
||||
github.com/nspcc-dev/neofs-sdk-go v0.0.0-20220113123743-7f3162110659/go.mod h1:/jay1lr3w7NQd/VDBkEhkJmDmyPNsu4W+QV2obsUV40=
|
||||
github.com/nspcc-dev/rfc6979 v0.1.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso=
|
||||
github.com/nspcc-dev/rfc6979 v0.2.0 h1:3e1WNxrN60/6N0DW7+UYisLeZJyfqZTNOjeV/toYvOE=
|
||||
github.com/nspcc-dev/rfc6979 v0.2.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso=
|
||||
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
|
||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM=
|
||||
github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
|
@ -304,7 +212,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
|||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U=
|
||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
|
||||
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
|
||||
|
@ -316,7 +223,6 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
|
|||
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
|
||||
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
||||
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
|
||||
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
|
||||
|
@ -324,15 +230,12 @@ github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8
|
|||
github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
|
||||
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
|
||||
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
||||
|
@ -341,24 +244,20 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
|
|||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/syndtr/goleveldb v0.0.0-20180307113352-169b1b37be73/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 h1:xQdMZ1WLrgkkvOZ/LDQxjVxMLdby7osSh4ZEVa5sIjs=
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM=
|
||||
github.com/twmb/murmur3 v1.1.5 h1:i9OLS9fkuLzBXjt6dptlAEyk58fJsSTXbRg3SgVyqgk=
|
||||
github.com/twmb/murmur3 v1.1.5/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=
|
||||
github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 h1:JwtAtbp7r/7QSyGz8mKUbYJBg2+6Cd7OjM8o/GNOcVo=
|
||||
|
@ -366,12 +265,6 @@ github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74/go.mod h1
|
|||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
|
||||
github.com/yuin/gopher-lua v0.0.0-20191128022950-c6266f4fe8d7/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
|
||||
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
|
@ -379,31 +272,21 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
|||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
|
||||
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
|
||||
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4=
|
||||
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
|
||||
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
|
||||
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
|
@ -437,10 +320,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
|
|||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -472,15 +353,10 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R
|
|||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
@ -496,19 +372,15 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
|||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
@ -517,18 +389,14 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
@ -546,21 +414,16 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210429154555-c04ba851c2a4/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
|
@ -576,7 +439,6 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
|||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180318012157-96caea41033d/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
|
@ -618,8 +480,6 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY
|
|||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
||||
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
@ -672,7 +532,6 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG
|
|||
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||
|
@ -692,10 +551,7 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa
|
|||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E=
|
||||
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
@ -708,10 +564,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
|||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/abiosoft/ishell.v2 v2.0.0/go.mod h1:sFp+cGtH6o4s1FtpVPTMcHq2yue+c4DGOVohJCPUzwY=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
@ -723,7 +577,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
|
|||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
|
|
@ -79,7 +79,7 @@ func Update(nef []byte, manifest string) {
|
|||
}
|
||||
|
||||
// _deploy initializes defaults (total supply and registration price) on contract deploy.
|
||||
func _deploy(data interface{}, isUpdate bool) {
|
||||
func _deploy(data any, isUpdate bool) {
|
||||
if isUpdate {
|
||||
return
|
||||
}
|
||||
|
@ -112,10 +112,10 @@ func OwnerOf(tokenID []byte) interop.Hash160 {
|
|||
}
|
||||
|
||||
// Properties returns domain name and expiration date of the specified domain.
|
||||
func Properties(tokenID []byte) map[string]interface{} {
|
||||
func Properties(tokenID []byte) map[string]any {
|
||||
ctx := storage.GetReadOnlyContext()
|
||||
ns := getNameState(ctx, tokenID)
|
||||
return map[string]interface{}{
|
||||
return map[string]any{
|
||||
"name": ns.Name,
|
||||
"expiration": ns.Expiration,
|
||||
"admin": ns.Admin,
|
||||
|
@ -151,7 +151,7 @@ func TokensOf(owner interop.Hash160) iterator.Iterator {
|
|||
}
|
||||
|
||||
// Transfer transfers domain with the specified name to new owner.
|
||||
func Transfer(to interop.Hash160, tokenID []byte, data interface{}) bool {
|
||||
func Transfer(to interop.Hash160, tokenID []byte, data any) bool {
|
||||
if !isValid(to) {
|
||||
panic(`invalid receiver`)
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ func updateBalance(ctx storage.Context, tokenId []byte, acc interop.Hash160, dif
|
|||
|
||||
// postTransfer sends Transfer notification to the network and calls onNEP11Payment
|
||||
// method.
|
||||
func postTransfer(from, to interop.Hash160, tokenID []byte, data interface{}) {
|
||||
func postTransfer(from, to interop.Hash160, tokenID []byte, data any) {
|
||||
runtime.Notify("Transfer", from, to, 1, tokenID)
|
||||
if management.GetContract(to) != nil {
|
||||
contract.Call(to, "onNEP11Payment", contract.All, from, 1, tokenID, data)
|
||||
|
|
|
@ -190,8 +190,8 @@ func TestRegisterAndRenew(t *testing.T) {
|
|||
t.Run("invalid token ID", func(t *testing.T) {
|
||||
c.InvokeFail(t, "token not found", "properties", "not.exists")
|
||||
c.InvokeFail(t, "token not found", "ownerOf", "not.exists")
|
||||
c.InvokeFail(t, "invalid conversion", "properties", []interface{}{})
|
||||
c.InvokeFail(t, "invalid conversion", "ownerOf", []interface{}{})
|
||||
c.InvokeFail(t, "invalid conversion", "properties", []any{})
|
||||
c.InvokeFail(t, "invalid conversion", "ownerOf", []any{})
|
||||
})
|
||||
|
||||
// Renew
|
||||
|
@ -294,7 +294,7 @@ func TestSetGetRecord(t *testing.T) {
|
|||
{Type: nns.AAAA, Name: "2001::13.1.68.3", ShouldFail: true},
|
||||
}
|
||||
for _, testCase := range testCases {
|
||||
args := []interface{}{"neo.com", int64(testCase.Type), testCase.Name}
|
||||
args := []any{"neo.com", int64(testCase.Type), testCase.Name}
|
||||
t.Run(testCase.Name, func(t *testing.T) {
|
||||
if testCase.ShouldFail {
|
||||
c.InvokeFail(t, "", "setRecord", args...)
|
||||
|
@ -377,7 +377,7 @@ func TestTransfer(t *testing.T) {
|
|||
ctr = neotest.CompileSource(t, e.CommitteeHash,
|
||||
strings.NewReader(`package foo
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop"
|
||||
func OnNEP11Payment(from interop.Hash160, amount int, token []byte, data interface{}) {}`),
|
||||
func OnNEP11Payment(from interop.Hash160, amount int, token []byte, data any) {}`),
|
||||
&compiler.Options{Name: "foo"})
|
||||
e.DeployContract(t, ctr, nil)
|
||||
cTo.Invoke(t, true, "transfer", ctr.Hash, []byte("neo.com"), nil)
|
||||
|
@ -404,7 +404,7 @@ func TestTokensOf(t *testing.T) {
|
|||
testTokensOf(t, c, [][]byte{}, util.Uint160{}.BytesBE()) // empty hash is a valid hash still
|
||||
}
|
||||
|
||||
func testTokensOf(t *testing.T, c *neotest.ContractInvoker, result [][]byte, args ...interface{}) {
|
||||
func testTokensOf(t *testing.T, c *neotest.ContractInvoker, result [][]byte, args ...any) {
|
||||
method := "tokensOf"
|
||||
if len(args) == 0 {
|
||||
method = "tokens"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/nft-nd
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -173,7 +173,7 @@ func OwnerOf(token []byte) interop.Hash160 {
|
|||
|
||||
// Transfer token from its owner to another user, notice that it only has three
|
||||
// parameters because token owner can be deduced from token ID itself.
|
||||
func Transfer(to interop.Hash160, token []byte, data interface{}) bool {
|
||||
func Transfer(to interop.Hash160, token []byte, data any) bool {
|
||||
if len(to) != 20 {
|
||||
panic("invalid 'to' address")
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ func Transfer(to interop.Hash160, token []byte, data interface{}) bool {
|
|||
}
|
||||
|
||||
// postTransfer emits Transfer event and calls onNEP11Payment if needed.
|
||||
func postTransfer(from interop.Hash160, to interop.Hash160, token []byte, data interface{}) {
|
||||
func postTransfer(from interop.Hash160, to interop.Hash160, token []byte, data any) {
|
||||
runtime.Notify("Transfer", from, to, 1, token)
|
||||
if management.GetContract(to) != nil {
|
||||
contract.Call(to, "onNEP11Payment", contract.All, from, 1, token, data)
|
||||
|
@ -209,7 +209,7 @@ func postTransfer(from interop.Hash160, to interop.Hash160, token []byte, data i
|
|||
// OnNEP17Payment mints tokens if at least 10 GAS is provided. You don't call
|
||||
// this method directly, instead it's called by GAS contract when you transfer
|
||||
// GAS from your address to the address of this NFT contract.
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data any) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
runtime.Log(r.(string))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/oracle
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -23,7 +23,7 @@ func FilteredRequest(url string, filter []byte) {
|
|||
// OracleCallback is called by Oracle native contract when request is finished.
|
||||
// It either throws an error (if the result is not successful) or logs the data
|
||||
// got as a result.
|
||||
func OracleCallback(url string, data interface{}, code int, res []byte) {
|
||||
func OracleCallback(url string, data any, code int, res []byte) {
|
||||
// This function shouldn't be called directly, we only expect oracle native
|
||||
// contract to be calling it.
|
||||
callingHash := runtime.GetCallingScriptHash()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/runtime
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -22,7 +22,7 @@ func init() {
|
|||
|
||||
// _deploy is called after contract deployment or update, it'll be called
|
||||
// in deployment transaction and if call update method of this contract.
|
||||
func _deploy(_ interface{}, isUpdate bool) {
|
||||
func _deploy(_ any, isUpdate bool) {
|
||||
if isUpdate {
|
||||
Log("_deploy method called after contract update")
|
||||
return
|
||||
|
@ -46,7 +46,7 @@ func Log(message string) {
|
|||
}
|
||||
|
||||
// Notify emits an event with the specified data.
|
||||
func Notify(event interface{}) {
|
||||
func Notify(event any) {
|
||||
runtime.Notify("Event", event)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/storage
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -29,12 +29,12 @@ func PutDefault(value []byte) []byte {
|
|||
}
|
||||
|
||||
// Get returns the value at the passed key.
|
||||
func Get(key []byte) interface{} {
|
||||
func Get(key []byte) any {
|
||||
return storage.Get(ctx, key)
|
||||
}
|
||||
|
||||
// GetDefault returns the value at the default key.
|
||||
func GetDefault() interface{} {
|
||||
func GetDefault() any {
|
||||
return storage.Get(ctx, defaultKey)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/timer
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -25,7 +25,7 @@ func init() {
|
|||
ctx = storage.GetContext()
|
||||
}
|
||||
|
||||
func _deploy(_ interface{}, isUpdate bool) {
|
||||
func _deploy(_ any, isUpdate bool) {
|
||||
if isUpdate {
|
||||
ticksLeft := storage.Get(ctx, ticksKey).(int) + 1
|
||||
storage.Put(ctx, ticksKey, ticksLeft)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/examples/token
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -46,7 +46,7 @@ func (t Token) BalanceOf(ctx storage.Context, holder []byte) int {
|
|||
}
|
||||
|
||||
// Transfer token from one user to another
|
||||
func (t Token) Transfer(ctx storage.Context, from, to interop.Hash160, amount int, data interface{}) bool {
|
||||
func (t Token) Transfer(ctx storage.Context, from, to interop.Hash160, amount int, data any) bool {
|
||||
amountFrom := t.CanTransfer(ctx, from, to, amount)
|
||||
if amountFrom == -1 {
|
||||
return false
|
||||
|
|
|
@ -53,7 +53,7 @@ func BalanceOf(holder interop.Hash160) int {
|
|||
}
|
||||
|
||||
// Transfer token from one user to another
|
||||
func Transfer(from interop.Hash160, to interop.Hash160, amount int, data interface{}) bool {
|
||||
func Transfer(from interop.Hash160, to interop.Hash160, amount int, data any) bool {
|
||||
return token.Transfer(ctx, from, to, amount, data)
|
||||
}
|
||||
|
||||
|
|
4
go.mod
4
go.mod
|
@ -10,7 +10,7 @@ require (
|
|||
github.com/holiman/uint256 v1.2.0
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||
github.com/mr-tron/base58 v1.2.0
|
||||
github.com/nspcc-dev/dbft v0.0.0-20230315155759-60347b1563e7
|
||||
github.com/nspcc-dev/dbft v0.0.0-20230404091436-0108387748cd
|
||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22
|
||||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
github.com/nspcc-dev/neofs-sdk-go v0.0.0-20220113123743-7f3162110659
|
||||
|
@ -60,4 +60,4 @@ require (
|
|||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
)
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
|
27
go.sum
27
go.sum
|
@ -172,7 +172,6 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
|
@ -251,8 +250,8 @@ github.com/nspcc-dev/dbft v0.0.0-20191209120240-0d6b7568d9ae/go.mod h1:3FjXOoHmA
|
|||
github.com/nspcc-dev/dbft v0.0.0-20200117124306-478e5cfbf03a/go.mod h1:/YFK+XOxxg0Bfm6P92lY5eDSLYfp06XOdL8KAVgXjVk=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20200219114139-199d286ed6c1/go.mod h1:O0qtn62prQSqizzoagHmuuKoz8QMkU3SzBoKdEvm3aQ=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20230315155759-60347b1563e7 h1:XP4vSXovxQHgbjHwmrbT/2sPFhSwzEy/HbcNs3kMzIo=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20230315155759-60347b1563e7/go.mod h1:IsUsZqxQkav23pFrCyZEibz0VukpI787XnbcsFkekI8=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20230404091436-0108387748cd h1:PYJbdSrB4S2Sp5e28CD0pxGE5xsCGO/6DZVQtBnllRc=
|
||||
github.com/nspcc-dev/dbft v0.0.0-20230404091436-0108387748cd/go.mod h1:kjBC9F8L25GR+kIHy/1KgG/KfcoGnVwIiyovgq1uszk=
|
||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20210915112629-e1b6cce73d02/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U=
|
||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 h1:n4ZaFCKt1pQJd7PXoMJabZWK9ejjbLOVrkl/lOUmshg=
|
||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U=
|
||||
|
@ -364,8 +363,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
|||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
|
||||
github.com/yuin/gopher-lua v0.0.0-20191128022950-c6266f4fe8d7/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
|
@ -383,7 +380,6 @@ go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
|
|||
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
|
||||
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
|
||||
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
|
@ -402,8 +398,6 @@ golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPh
|
|||
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
||||
golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
|
||||
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
|
@ -436,7 +430,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
|
|||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -473,13 +466,9 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R
|
|||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
||||
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
|
@ -500,7 +489,6 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
|
|||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
|
@ -550,24 +538,16 @@ golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210429154555-c04ba851c2a4/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
|
||||
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -577,8 +557,6 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
|||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
|
@ -627,7 +605,6 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc
|
|||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
|
|
@ -187,7 +187,7 @@ func Init(t *testing.T, rootpath string, e *neotest.Executor) {
|
|||
_, _, _ = deployContractFromPriv0(t, verifyPath, "Verify", verifyCfg, VerifyContractID)
|
||||
|
||||
// Block #8: deposit some GAS to notary contract for priv0.
|
||||
transferTxH = gasPriv0Invoker.Invoke(t, true, "transfer", priv0ScriptHash, notaryHash, 10_0000_0000, []interface{}{priv0ScriptHash, int64(e.Chain.BlockHeight() + 1000)})
|
||||
transferTxH = gasPriv0Invoker.Invoke(t, true, "transfer", priv0ScriptHash, notaryHash, 10_0000_0000, []any{priv0ScriptHash, int64(e.Chain.BlockHeight() + 1000)})
|
||||
t.Logf("notaryDepositTxPriv0: %v", transferTxH.StringLE())
|
||||
|
||||
// Block #9: designate new Notary node.
|
||||
|
@ -195,7 +195,7 @@ func Init(t *testing.T, rootpath string, e *neotest.Executor) {
|
|||
require.NoError(t, err)
|
||||
require.NoError(t, ntr.Accounts[0].Decrypt("one", ntr.Scrypt))
|
||||
designateSuperInvoker.Invoke(t, stackitem.Null{}, "designateAsRole",
|
||||
int64(noderoles.P2PNotary), []interface{}{ntr.Accounts[0].PublicKey().Bytes()})
|
||||
int64(noderoles.P2PNotary), []any{ntr.Accounts[0].PublicKey().Bytes()})
|
||||
t.Logf("Designated Notary node: %s", hex.EncodeToString(ntr.Accounts[0].PublicKey().Bytes()))
|
||||
|
||||
// Block #10: push verification contract with arguments into the chain.
|
||||
|
@ -252,7 +252,7 @@ func Init(t *testing.T, rootpath string, e *neotest.Executor) {
|
|||
containerID := util.Uint256{1, 2, 3}
|
||||
objectID := util.Uint256{4, 5, 6}
|
||||
txGas0toNFSH := gasPriv0Invoker.Invoke(t, true, "transfer",
|
||||
priv0ScriptHash, nfsHash, 10_0000_0000, []interface{}{containerID.BytesBE(), objectID.BytesBE()}) // block #18
|
||||
priv0ScriptHash, nfsHash, 10_0000_0000, []any{containerID.BytesBE(), objectID.BytesBE()}) // block #18
|
||||
res = e.GetTxExecResult(t, txGas0toNFSH)
|
||||
require.Equal(t, 2, len(res.Events)) // GAS transfer + NFSO transfer
|
||||
tokenID, err = res.Events[1].Item.Value().([]stackitem.Item)[3].TryBytes()
|
||||
|
|
|
@ -16,7 +16,7 @@ const valuesCount = 255
|
|||
// valuesPrefix is the prefix values are stored by.
|
||||
var valuesPrefix = []byte{0x01}
|
||||
|
||||
func _deploy(data interface{}, isUpdate bool) {
|
||||
func _deploy(data any, isUpdate bool) {
|
||||
if !isUpdate {
|
||||
ctx := storage.GetContext()
|
||||
for i := 0; i < valuesCount; i++ {
|
||||
|
|
|
@ -27,7 +27,7 @@ func Init() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data any) {
|
||||
curr := runtime.GetExecutingScriptHash()
|
||||
balance := neo.BalanceOf(curr)
|
||||
if ledger.CurrentIndex() >= 100 {
|
||||
|
@ -47,7 +47,7 @@ func Verify() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func Transfer(from, to interop.Hash160, amount int, data interface{}) bool {
|
||||
func Transfer(from, to interop.Hash160, amount int, data any) bool {
|
||||
ctx := storage.GetContext()
|
||||
if len(from) != 20 {
|
||||
runtime.Log("invalid 'from' address")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module github.com/nspcc-dev/neo-go/internal/examples/oracle
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb
|
||||
|
|
|
@ -12,22 +12,22 @@ import (
|
|||
|
||||
// RequestURL accepts a complete set of parameters to make an oracle request and
|
||||
// performs it.
|
||||
func RequestURL(url string, filter []byte, callback string, userData interface{}, gasForResponse int) {
|
||||
func RequestURL(url string, filter []byte, callback string, userData any, gasForResponse int) {
|
||||
oracle.Request(url, filter, callback, userData, gasForResponse)
|
||||
}
|
||||
|
||||
// Handle is a response handler that writes response data to the storage.
|
||||
func Handle(url string, data interface{}, code int, res []byte) {
|
||||
func Handle(url string, data any, code int, res []byte) {
|
||||
// ABORT if len(data) == 2, some tests use this feature.
|
||||
if data != nil && len(data.(string)) == 2 {
|
||||
util.Abort()
|
||||
}
|
||||
params := []interface{}{url, data, code, res}
|
||||
params := []any{url, data, code, res}
|
||||
storage.Put(storage.GetContext(), "lastOracleResponse", std.Serialize(params))
|
||||
}
|
||||
|
||||
// HandleRecursive invokes oracle.finish again to test Oracle reentrance.
|
||||
func HandleRecursive(url string, data interface{}, code int, res []byte) {
|
||||
func HandleRecursive(url string, data any, code int, res []byte) {
|
||||
// Regular safety check.
|
||||
callingHash := runtime.GetCallingScriptHash()
|
||||
if !callingHash.Equals(oracle.Hash) {
|
||||
|
|
|
@ -28,7 +28,7 @@ type FakeChain struct {
|
|||
blocksCh []chan *block.Block
|
||||
Blockheight uint32
|
||||
PoolTxF func(*transaction.Transaction) error
|
||||
poolTxWithData func(*transaction.Transaction, interface{}, *mempool.Pool) error
|
||||
poolTxWithData func(*transaction.Transaction, any, *mempool.Pool) error
|
||||
blocks map[util.Uint256]*block.Block
|
||||
hdrHashes map[uint32]util.Uint256
|
||||
txs map[util.Uint256]*transaction.Transaction
|
||||
|
@ -64,7 +64,7 @@ func NewFakeChainWithCustomCfg(protocolCfg func(c *config.Blockchain)) *FakeChai
|
|||
return &FakeChain{
|
||||
Pool: mempool.New(10, 0, false),
|
||||
PoolTxF: func(*transaction.Transaction) error { return nil },
|
||||
poolTxWithData: func(*transaction.Transaction, interface{}, *mempool.Pool) error { return nil },
|
||||
poolTxWithData: func(*transaction.Transaction, any, *mempool.Pool) error { return nil },
|
||||
blocks: make(map[util.Uint256]*block.Block),
|
||||
hdrHashes: make(map[uint32]util.Uint256),
|
||||
txs: make(map[util.Uint256]*transaction.Transaction),
|
||||
|
@ -149,7 +149,7 @@ func (chain *FakeChain) GetMaxVerificationGAS() int64 {
|
|||
}
|
||||
|
||||
// PoolTxWithData implements the Blockchainer interface.
|
||||
func (chain *FakeChain) PoolTxWithData(t *transaction.Transaction, data interface{}, mp *mempool.Pool, feer mempool.Feer, verificationFunction func(t *transaction.Transaction, data interface{}) error) error {
|
||||
func (chain *FakeChain) PoolTxWithData(t *transaction.Transaction, data any, mp *mempool.Pool, feer mempool.Feer, verificationFunction func(t *transaction.Transaction, data any) error) error {
|
||||
return chain.poolTxWithData(t, data, mp)
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
// MarshalUnmarshalJSON checks if the expected stays the same after
|
||||
// marshal/unmarshal via JSON.
|
||||
func MarshalUnmarshalJSON(t *testing.T, expected, actual interface{}) {
|
||||
func MarshalUnmarshalJSON(t *testing.T, expected, actual any) {
|
||||
data, err := json.Marshal(expected)
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, json.Unmarshal(data, actual))
|
||||
|
@ -21,7 +21,7 @@ func MarshalUnmarshalJSON(t *testing.T, expected, actual interface{}) {
|
|||
|
||||
// MarshalUnmarshalYAML checks if the expected stays the same after
|
||||
// marshal/unmarshal via YAML.
|
||||
func MarshalUnmarshalYAML(t *testing.T, expected, actual interface{}) {
|
||||
func MarshalUnmarshalYAML(t *testing.T, expected, actual any) {
|
||||
data, err := yaml.Marshal(expected)
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, yaml.Unmarshal(data, actual))
|
||||
|
|
|
@ -122,7 +122,7 @@ func (c *codegen) fillImportMap(f *ast.File, pkg *packages.Package) {
|
|||
}
|
||||
}
|
||||
|
||||
func getBuildInfo(name string, src interface{}) (*buildInfo, error) {
|
||||
func getBuildInfo(name string, src any) (*buildInfo, error) {
|
||||
dir, err := filepath.Abs(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -102,25 +102,25 @@ func TestOnPayableChecks(t *testing.T) {
|
|||
t.Run("NEP-11, good", func(t *testing.T) {
|
||||
src := `package payable
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop"
|
||||
func OnNEP11Payment(from interop.Hash160, amount int, tokenID []byte, data interface{}) {}`
|
||||
func OnNEP11Payment(from interop.Hash160, amount int, tokenID []byte, data any) {}`
|
||||
require.NoError(t, compileAndCheck(t, src))
|
||||
})
|
||||
t.Run("NEP-11, bad", func(t *testing.T) {
|
||||
src := `package payable
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop"
|
||||
func OnNEP11Payment(from interop.Hash160, amount int, oldParam string, tokenID []byte, data interface{}) {}`
|
||||
func OnNEP11Payment(from interop.Hash160, amount int, oldParam string, tokenID []byte, data any) {}`
|
||||
require.Error(t, compileAndCheck(t, src))
|
||||
})
|
||||
t.Run("NEP-17, good", func(t *testing.T) {
|
||||
src := `package payable
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop"
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {}`
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data any) {}`
|
||||
require.NoError(t, compileAndCheck(t, src))
|
||||
})
|
||||
t.Run("NEP-17, bad", func(t *testing.T) {
|
||||
src := `package payable
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop"
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data interface{}, extra int) {}`
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data any, extra int) {}`
|
||||
require.Error(t, compileAndCheck(t, src))
|
||||
})
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ func TestEventWarnings(t *testing.T) {
|
|||
src := `package payable
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
||||
func Main() {
|
||||
runtime.Notify("Event", []interface{}{1}...)
|
||||
runtime.Notify("Event", []any{1}...)
|
||||
}`
|
||||
|
||||
_, di, err := compiler.CompileWithOptions("eventTest.go", strings.NewReader(src), nil)
|
||||
|
@ -407,7 +407,7 @@ func TestUnnamedParameterCheck(t *testing.T) {
|
|||
t.Run("interface", func(t *testing.T) {
|
||||
src := `
|
||||
package testcase
|
||||
func OnNEP17Payment(h string, i int, _ interface{}){}
|
||||
func OnNEP17Payment(h string, i int, _ any){}
|
||||
`
|
||||
_, _, err := compiler.CompileWithOptions("test.go", strings.NewReader(src), nil)
|
||||
require.Error(t, err)
|
||||
|
@ -416,7 +416,7 @@ func TestUnnamedParameterCheck(t *testing.T) {
|
|||
t.Run("a set of unnamed params", func(t *testing.T) {
|
||||
src := `
|
||||
package testcase
|
||||
func OnNEP17Payment(_ string, _ int, _ interface{}){}
|
||||
func OnNEP17Payment(_ string, _ int, _ any){}
|
||||
`
|
||||
_, _, err := compiler.CompileWithOptions("test.go", strings.NewReader(src), nil)
|
||||
require.Error(t, err)
|
||||
|
@ -447,11 +447,19 @@ func TestUnnamedParameterCheck(t *testing.T) {
|
|||
_, _, err := compiler.CompileWithOptions("test.go", strings.NewReader(src), nil)
|
||||
require.NoError(t, err)
|
||||
})
|
||||
t.Run("good, use any keyword", func(t *testing.T) {
|
||||
src := `
|
||||
package testcase
|
||||
func OnNEP17Payment(s string, i int, iface any){}
|
||||
`
|
||||
_, _, err := compiler.CompileWithOptions("test.go", strings.NewReader(src), nil)
|
||||
require.NoError(t, err)
|
||||
})
|
||||
t.Run("method with unnamed params", func(t *testing.T) {
|
||||
src := `
|
||||
package testcase
|
||||
type A int
|
||||
func (rsv A) OnNEP17Payment(_ string, _ int, iface interface{}){}
|
||||
func (rsv A) OnNEP17Payment(_ string, _ int, iface any){}
|
||||
`
|
||||
_, _, err := compiler.CompileWithOptions("test.go", strings.NewReader(src), nil)
|
||||
require.NoError(t, err) // it's OK for exported method to have unnamed params as it won't be included into manifest
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
type convertTestCase struct {
|
||||
returnType string
|
||||
argValue string
|
||||
result interface{}
|
||||
result any
|
||||
}
|
||||
|
||||
func getFunctionName(typ string) string {
|
||||
|
@ -85,7 +85,7 @@ func TestTypeAssertion(t *testing.T) {
|
|||
src := `package foo
|
||||
func Main() int {
|
||||
a := []byte{1}
|
||||
var u interface{}
|
||||
var u any
|
||||
u = a
|
||||
return u.(int)
|
||||
}`
|
||||
|
@ -95,7 +95,7 @@ func TestTypeAssertion(t *testing.T) {
|
|||
src := `package foo
|
||||
func Main() int {
|
||||
a := []byte{1}
|
||||
var u interface{}
|
||||
var u any
|
||||
u = a
|
||||
var ret = u.(int)
|
||||
return ret
|
||||
|
@ -106,7 +106,7 @@ func TestTypeAssertion(t *testing.T) {
|
|||
src := `package foo
|
||||
func Main() int {
|
||||
a := []byte{1}
|
||||
var u interface{}
|
||||
var u any
|
||||
u = a
|
||||
var ret int
|
||||
ret = u.(int)
|
||||
|
@ -118,7 +118,7 @@ func TestTypeAssertion(t *testing.T) {
|
|||
src := `package foo
|
||||
func Main() int {
|
||||
a := []byte{1}
|
||||
var u interface{}
|
||||
var u any
|
||||
u = a
|
||||
ret := u.(int)
|
||||
return ret
|
||||
|
@ -132,7 +132,7 @@ func TestTypeAssertionWithOK(t *testing.T) {
|
|||
src := `package foo
|
||||
func Main() bool {
|
||||
a := 1
|
||||
var u interface{}
|
||||
var u any
|
||||
u = a
|
||||
var _, ok = u.(int) // *ast.GenDecl
|
||||
return ok
|
||||
|
@ -145,7 +145,7 @@ func TestTypeAssertionWithOK(t *testing.T) {
|
|||
src := `package foo
|
||||
func Main() bool {
|
||||
a := 1
|
||||
var u interface{}
|
||||
var u any
|
||||
u = a
|
||||
var ok bool
|
||||
_, ok = u.(int) // *ast.AssignStmt
|
||||
|
@ -159,7 +159,7 @@ func TestTypeAssertionWithOK(t *testing.T) {
|
|||
src := `package foo
|
||||
func Main() bool {
|
||||
a := 1
|
||||
var u interface{}
|
||||
var u any
|
||||
u = a
|
||||
_, ok := u.(int) // *ast.AssignStmt
|
||||
return ok
|
||||
|
@ -231,7 +231,7 @@ func TestInterfaceTypeConversion(t *testing.T) {
|
|||
src := `package foo
|
||||
func Main() int {
|
||||
a := 1
|
||||
b := interface{}(a).(int)
|
||||
b := any(a).(int)
|
||||
return b
|
||||
}`
|
||||
eval(t, src, big.NewInt(1))
|
||||
|
|
|
@ -308,7 +308,7 @@ func scAndVMInteropTypeFromExpr(named *types.Named, isPointer bool) (smartcontra
|
|||
}
|
||||
return smartcontract.InteropInterfaceType,
|
||||
stackitem.InteropT,
|
||||
binding.Override{TypeName: "interface{}"},
|
||||
binding.Override{TypeName: "any"},
|
||||
&binding.ExtendedType{Base: smartcontract.InteropInterfaceType, Interface: "iterator"} // Temporarily all interops are iterators.
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,7 @@ func (c *codegen) scAndVMTypeFromExpr(typ ast.Expr, exts map[string]binding.Exte
|
|||
|
||||
func (c *codegen) scAndVMTypeFromType(t types.Type, exts map[string]binding.ExtendedType) (smartcontract.ParamType, stackitem.Type, binding.Override, *binding.ExtendedType) {
|
||||
if t == nil {
|
||||
return smartcontract.AnyType, stackitem.AnyT, binding.Override{TypeName: "interface{}"}, nil
|
||||
return smartcontract.AnyType, stackitem.AnyT, binding.Override{TypeName: "any"}, nil
|
||||
}
|
||||
|
||||
var isPtr bool
|
||||
|
@ -357,7 +357,7 @@ func (c *codegen) scAndVMTypeFromType(t types.Type, exts map[string]binding.Exte
|
|||
over.TypeName = "string"
|
||||
return smartcontract.StringType, stackitem.ByteArrayT, over, nil
|
||||
default:
|
||||
over.TypeName = "interface{}"
|
||||
over.TypeName = "any"
|
||||
return smartcontract.AnyType, stackitem.AnyT, over, nil
|
||||
}
|
||||
case *types.Map:
|
||||
|
@ -412,7 +412,7 @@ func (c *codegen) scAndVMTypeFromType(t types.Type, exts map[string]binding.Exte
|
|||
}
|
||||
return smartcontract.ArrayType, stackitem.ArrayT, over, et
|
||||
default:
|
||||
over.TypeName = "interface{}"
|
||||
over.TypeName = "any"
|
||||
return smartcontract.AnyType, stackitem.AnyT, over, nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ func MethodParams(addr interop.Hash160, h interop.Hash256,
|
|||
type MyStruct struct {}
|
||||
func (ms MyStruct) MethodOnStruct() { }
|
||||
func (ms *MyStruct) MethodOnPointerToStruct() { }
|
||||
func _deploy(data interface{}, isUpdate bool) { x := 1; _ = x }
|
||||
func _deploy(data any, isUpdate bool) { x := 1; _ = x }
|
||||
`
|
||||
|
||||
ne, d, err := CompileWithOptions("foo.go", strings.NewReader(src), nil)
|
||||
|
|
|
@ -32,7 +32,7 @@ func TestEntryPointWithArgs(t *testing.T) {
|
|||
src := `
|
||||
package foo
|
||||
|
||||
func Main(args []interface{}) int {
|
||||
func Main(args []any) int {
|
||||
return 2 + args[1].(int)
|
||||
}
|
||||
`
|
||||
|
@ -44,7 +44,7 @@ func TestEntryPointWithMethodAndArgs(t *testing.T) {
|
|||
src := `
|
||||
package foo
|
||||
|
||||
func Main(method string, args []interface{}) int {
|
||||
func Main(method string, args []any) int {
|
||||
if method == "foobar" {
|
||||
return 2 + args[1].(int)
|
||||
}
|
||||
|
|
|
@ -173,6 +173,21 @@ func TestFunctionCallWithInterfaceType(t *testing.T) {
|
|||
eval(t, src, big.NewInt(10))
|
||||
}
|
||||
|
||||
func TestFunctionCallWithAnyKeywordType(t *testing.T) {
|
||||
src := `
|
||||
package testcase
|
||||
func Main() any {
|
||||
x := getSomeInteger(10)
|
||||
return x
|
||||
}
|
||||
|
||||
func getSomeInteger(x any) any {
|
||||
return x
|
||||
}
|
||||
`
|
||||
eval(t, src, big.NewInt(10))
|
||||
}
|
||||
|
||||
func TestFunctionCallMultiArg(t *testing.T) {
|
||||
src := `
|
||||
package testcase
|
||||
|
@ -312,7 +327,7 @@ func TestJumpOptimize(t *testing.T) {
|
|||
var a int
|
||||
_ = a
|
||||
}
|
||||
func _deploy(_ interface{}, upd bool) {
|
||||
func _deploy(_ any, upd bool) {
|
||||
if true {} else {}
|
||||
t := upd
|
||||
_ = t
|
||||
|
|
|
@ -137,9 +137,9 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func f() int {
|
||||
return 4
|
||||
}`
|
||||
eval(t, src, big.NewInt(4), []interface{}{opcode.INITSSLOT, []byte{2}}, // sslot for A and C
|
||||
eval(t, src, big.NewInt(4), []any{opcode.INITSSLOT, []byte{2}}, // sslot for A and C
|
||||
opcode.PUSH1, opcode.STSFLD0, // store A
|
||||
[]interface{}{opcode.CALL, []byte{10}}, opcode.DROP, // evaluate B and drop
|
||||
[]any{opcode.CALL, []byte{10}}, opcode.DROP, // evaluate B and drop
|
||||
opcode.PUSH3, opcode.STSFLD1, opcode.RET, // store C
|
||||
opcode.LDSFLD0, opcode.LDSFLD1, opcode.ADD, opcode.RET, // Main
|
||||
opcode.PUSH4, opcode.RET) // f
|
||||
|
@ -166,7 +166,7 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func Main() int {
|
||||
return A
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
eval(t, src, big.NewInt(1), []any{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
opcode.PUSH1, opcode.STSFLD0, opcode.RET, // store A
|
||||
opcode.LDSFLD0, opcode.RET) // Main
|
||||
})
|
||||
|
@ -176,7 +176,7 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func Main() int {
|
||||
return A + B
|
||||
}`
|
||||
eval(t, src, big.NewInt(4), []interface{}{opcode.INITSSLOT, []byte{2}}, // sslot for A and B
|
||||
eval(t, src, big.NewInt(4), []any{opcode.INITSSLOT, []byte{2}}, // sslot for A and B
|
||||
opcode.PUSH1, opcode.STSFLD0, // store A
|
||||
opcode.PUSH3, opcode.STSFLD1, opcode.RET, // store B
|
||||
opcode.LDSFLD0, opcode.LDSFLD1, opcode.ADD, opcode.RET) // Main
|
||||
|
@ -190,7 +190,7 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func Main() int {
|
||||
return A + B + C
|
||||
}`
|
||||
eval(t, src, big.NewInt(4), []interface{}{opcode.INITSSLOT, []byte{3}}, // sslot for A, B, C
|
||||
eval(t, src, big.NewInt(4), []any{opcode.INITSSLOT, []byte{3}}, // sslot for A, B, C
|
||||
opcode.PUSH1, opcode.STSFLD0, // store A
|
||||
opcode.PUSH3, opcode.STSFLD1, // store B
|
||||
opcode.PUSH0, opcode.STSFLD2, opcode.RET, // store C
|
||||
|
@ -205,9 +205,9 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func f() int {
|
||||
return 2
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
eval(t, src, big.NewInt(1), []any{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
opcode.PUSH1, opcode.STSFLD0, // store A
|
||||
[]interface{}{opcode.CALL, []byte{6}}, opcode.DROP, opcode.RET, // evaluate Unused1 (call to f) and drop its value
|
||||
[]any{opcode.CALL, []byte{6}}, opcode.DROP, opcode.RET, // evaluate Unused1 (call to f) and drop its value
|
||||
opcode.LDSFLD0, opcode.RET, // Main
|
||||
opcode.PUSH2, opcode.RET) // f
|
||||
})
|
||||
|
@ -221,7 +221,7 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func f() int {
|
||||
return 2
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.CALL, []byte{8}}, opcode.PUSH1, opcode.PACKSTRUCT, opcode.DROP, opcode.RET, // evaluate struct val
|
||||
eval(t, src, big.NewInt(1), []any{opcode.CALL, []byte{8}}, opcode.PUSH1, opcode.PACKSTRUCT, opcode.DROP, opcode.RET, // evaluate struct val
|
||||
opcode.PUSH1, opcode.RET, // Main
|
||||
opcode.PUSH2, opcode.RET) // f
|
||||
})
|
||||
|
@ -319,11 +319,11 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func f() int {
|
||||
return 2
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.INITSSLOT, []byte{3}}, // sslot for A
|
||||
eval(t, src, big.NewInt(1), []any{opcode.INITSSLOT, []byte{3}}, // sslot for A
|
||||
opcode.PUSH1, opcode.STSFLD0, // store A
|
||||
opcode.LDSFLD0, opcode.PUSH1, opcode.ADD, opcode.STSFLD1, // store B
|
||||
opcode.PUSH3, opcode.STSFLD2, // store C
|
||||
opcode.LDSFLD1, []interface{}{opcode.CALL, []byte{9}}, opcode.ADD, opcode.LDSFLD2, opcode.ADD, opcode.DROP, opcode.RET, // evaluate D and drop
|
||||
opcode.LDSFLD1, []any{opcode.CALL, []byte{9}}, opcode.ADD, opcode.LDSFLD2, opcode.ADD, opcode.DROP, opcode.RET, // evaluate D and drop
|
||||
opcode.PUSH1, opcode.RET, // Main
|
||||
opcode.PUSH2, opcode.RET) // f
|
||||
})
|
||||
|
@ -337,11 +337,11 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func f(a int) int {
|
||||
return a
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
eval(t, src, big.NewInt(1), []any{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
opcode.PUSH1, opcode.STSFLD0, // store A
|
||||
opcode.LDSFLD0, []interface{}{opcode.CALL, []byte{6}}, opcode.DROP, opcode.RET, // evaluate B and drop
|
||||
opcode.LDSFLD0, []any{opcode.CALL, []byte{6}}, opcode.DROP, opcode.RET, // evaluate B and drop
|
||||
opcode.PUSH1, opcode.RET, // Main
|
||||
[]interface{}{opcode.INITSLOT, []byte{0, 1}}, opcode.LDARG0, opcode.RET) // f
|
||||
[]any{opcode.INITSLOT, []byte{0, 1}}, opcode.LDARG0, opcode.RET) // f
|
||||
})
|
||||
t.Run("named, inside multi-specs and multi-vals var declaration", func(t *testing.T) {
|
||||
src := `package foo
|
||||
|
@ -355,7 +355,7 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func f() int {
|
||||
return 5
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), opcode.PUSH3, []interface{}{opcode.CALL, []byte{7}}, opcode.ADD, opcode.DROP, opcode.RET, // evaluate and drop A
|
||||
eval(t, src, big.NewInt(1), opcode.PUSH3, []any{opcode.CALL, []byte{7}}, opcode.ADD, opcode.DROP, opcode.RET, // evaluate and drop A
|
||||
opcode.PUSH1, opcode.RET, // Main
|
||||
opcode.PUSH5, opcode.RET) // f
|
||||
})
|
||||
|
@ -367,7 +367,7 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func Main() int {
|
||||
return A
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
eval(t, src, big.NewInt(1), []any{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
opcode.PUSH1, opcode.STSFLD0, opcode.RET, // store A
|
||||
opcode.LDSFLD0, opcode.RET) // Main
|
||||
})
|
||||
|
@ -395,8 +395,8 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func f() (int, int) {
|
||||
return 3, 4
|
||||
}`
|
||||
eval(t, src, big.NewInt(3), []interface{}{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
[]interface{}{opcode.CALL, []byte{7}}, opcode.STSFLD0, opcode.DROP, opcode.RET, // evaluate and store A, drop B
|
||||
eval(t, src, big.NewInt(3), []any{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
[]any{opcode.CALL, []byte{7}}, opcode.STSFLD0, opcode.DROP, opcode.RET, // evaluate and store A, drop B
|
||||
opcode.LDSFLD0, opcode.RET, // Main
|
||||
opcode.PUSH4, opcode.PUSH3, opcode.RET) // f
|
||||
})
|
||||
|
@ -460,12 +460,12 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func f(a int) int {
|
||||
return a
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.INITSSLOT, []byte{2}}, // sslot for A, B
|
||||
eval(t, src, big.NewInt(1), []any{opcode.INITSSLOT, []byte{2}}, // sslot for A, B
|
||||
opcode.PUSH2, opcode.STSFLD0, // store A
|
||||
opcode.PUSH3, opcode.LDSFLD0, opcode.PUSH1, opcode.PUSH3, opcode.PACK, opcode.PUSH1, opcode.PICKITEM, opcode.STSFLD1, // evaluate B
|
||||
opcode.PUSH1, []interface{}{opcode.CALL, []byte{8}}, opcode.LDSFLD1, opcode.ADD, opcode.DROP, opcode.RET, // evalute C and drop
|
||||
opcode.PUSH1, []any{opcode.CALL, []byte{8}}, opcode.LDSFLD1, opcode.ADD, opcode.DROP, opcode.RET, // evalute C and drop
|
||||
opcode.PUSH1, opcode.RET, // Main
|
||||
[]interface{}{opcode.INITSLOT, []byte{0, 1}}, opcode.LDARG0, opcode.RET) // f
|
||||
[]any{opcode.INITSLOT, []byte{0, 1}}, opcode.LDARG0, opcode.RET) // f
|
||||
})
|
||||
t.Run("index expression", func(t *testing.T) {
|
||||
src := `package foo
|
||||
|
@ -477,13 +477,13 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func f(a int) int {
|
||||
return a
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.INITSSLOT, []byte{1}}, // sslot for Unused
|
||||
eval(t, src, big.NewInt(1), []any{opcode.INITSSLOT, []byte{1}}, // sslot for Unused
|
||||
opcode.PUSH2, opcode.STSFLD0, // store Unused
|
||||
opcode.PUSH1, []interface{}{opcode.CALL, []byte{14}}, // call f(1)
|
||||
opcode.PUSH1, []any{opcode.CALL, []byte{14}}, // call f(1)
|
||||
opcode.PUSH3, opcode.PUSH2, opcode.PUSH1, opcode.PUSH3, opcode.PACK, opcode.LDSFLD0, opcode.PICKITEM, // eval index expression
|
||||
opcode.ADD, opcode.DROP, opcode.RET, // eval and drop A
|
||||
opcode.PUSH1, opcode.RET, // Main
|
||||
[]interface{}{opcode.INITSLOT, []byte{0, 1}}, opcode.LDARG0, opcode.RET) // f(a)
|
||||
[]any{opcode.INITSLOT, []byte{0, 1}}, opcode.LDARG0, opcode.RET) // f(a)
|
||||
})
|
||||
t.Run("used via nested function calls", func(t *testing.T) {
|
||||
src := `package foo
|
||||
|
@ -497,10 +497,10 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func g() int {
|
||||
return A
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
eval(t, src, big.NewInt(1), []any{opcode.INITSSLOT, []byte{1}}, // sslot for A
|
||||
opcode.PUSH1, opcode.STSFLD0, opcode.RET, // store A
|
||||
[]interface{}{opcode.CALL, []byte{3}}, opcode.RET, // Main
|
||||
[]interface{}{opcode.CALL, []byte{3}}, opcode.RET, // f
|
||||
[]any{opcode.CALL, []byte{3}}, opcode.RET, // Main
|
||||
[]any{opcode.CALL, []byte{3}}, opcode.RET, // f
|
||||
opcode.LDSFLD0, opcode.RET) // g
|
||||
})
|
||||
t.Run("struct field name matches global var name", func(t *testing.T) {
|
||||
|
@ -511,7 +511,7 @@ func TestUnusedOptimizedGlobalVar(t *testing.T) {
|
|||
func Main() int {
|
||||
return str.Int
|
||||
}`
|
||||
eval(t, src, big.NewInt(2), []interface{}{opcode.INITSSLOT, []byte{1}}, // sslot for str
|
||||
eval(t, src, big.NewInt(2), []any{opcode.INITSSLOT, []byte{1}}, // sslot for str
|
||||
opcode.PUSH2, opcode.PUSH1, opcode.PACKSTRUCT, opcode.STSFLD0, opcode.RET, // store str
|
||||
opcode.LDSFLD0, opcode.PUSH0, opcode.PICKITEM, opcode.RET) // Main
|
||||
})
|
||||
|
@ -929,11 +929,11 @@ func TestUnderscoreGlobalVarDontEmitCode(t *testing.T) {
|
|||
func f(a, b int) (int, int, int) {
|
||||
return 8, 9, 10
|
||||
}`
|
||||
eval(t, src, big.NewInt(1), []interface{}{opcode.INITSSLOT, []byte{2}}, // sslot for A, B
|
||||
eval(t, src, big.NewInt(1), []any{opcode.INITSSLOT, []byte{2}}, // sslot for A, B
|
||||
opcode.PUSH2, opcode.STSFLD0, // store A
|
||||
opcode.PUSH5, opcode.STSFLD1, // store B
|
||||
opcode.LDSFLD0, opcode.LDSFLD1, opcode.SWAP, []interface{}{opcode.CALL, []byte{8}}, // evaluate f(A,B)
|
||||
opcode.LDSFLD0, opcode.LDSFLD1, opcode.SWAP, []any{opcode.CALL, []byte{8}}, // evaluate f(A,B)
|
||||
opcode.DROP, opcode.DROP, opcode.DROP, opcode.RET, // drop result of f(A,B)
|
||||
opcode.PUSH1, opcode.RET, // Main
|
||||
[]interface{}{opcode.INITSLOT, []byte{0, 2}}, opcode.PUSH10, opcode.PUSH9, opcode.PUSH8, opcode.RET) // f
|
||||
[]any{opcode.INITSLOT, []byte{0, 2}}, opcode.PUSH10, opcode.PUSH9, opcode.PUSH8, opcode.RET) // f
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ func TestTypeConstantSize(t *testing.T) {
|
|||
src := `package foo
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop"
|
||||
var a %T // type declaration is always ok
|
||||
func Main() interface{} {
|
||||
func Main() any {
|
||||
return %#v
|
||||
}`
|
||||
|
||||
|
@ -532,7 +532,7 @@ func TestCallWithVersion(t *testing.T) {
|
|||
"github.com/nspcc-dev/neo-go/pkg/interop/contract"
|
||||
util "github.com/nspcc-dev/neo-go/pkg/interop/lib/contract"
|
||||
)
|
||||
func CallWithVersion(hash interop.Hash160, version int, method string) interface{} {
|
||||
func CallWithVersion(hash interop.Hash160, version int, method string) any {
|
||||
return util.CallWithVersion(hash, version, method, contract.All)
|
||||
}`
|
||||
ctr := neotest.CompileSource(t, e.CommitteeHash, strings.NewReader(src), &compiler.Options{Name: "Helper"})
|
||||
|
@ -569,7 +569,7 @@ func TestForcedNotifyArgumentsConversion(t *testing.T) {
|
|||
runtime.Notify("withoutEllipsis", arg0, arg1, arg2, arg3, arg4, 5, f(6)) // The fifth argument is basic literal.
|
||||
}
|
||||
func WithEllipsis() {
|
||||
arg := []interface{}{0, 1, f(2), 3, 4, 5, 6}
|
||||
arg := []any{0, 1, f(2), 3, 4, 5, 6}
|
||||
runtime.Notify("withEllipsis", arg...)
|
||||
}
|
||||
func f(i int) int {
|
||||
|
|
|
@ -295,7 +295,7 @@ func addNativeTestCase(t *testing.T, srcBuilder *bytes.Buffer, ctr interop.Contr
|
|||
isVoid := md.MD.ReturnType == smartcontract.VoidType
|
||||
srcBuilder.WriteString("func F" + strconv.Itoa(i) + "() ")
|
||||
if !isVoid {
|
||||
srcBuilder.WriteString("interface{} { return ")
|
||||
srcBuilder.WriteString("any { return ")
|
||||
} else {
|
||||
srcBuilder.WriteString("{ ")
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ var nilTestCases = []testCase{
|
|||
`
|
||||
package foo
|
||||
func Main() int {
|
||||
var t interface{}
|
||||
var t any
|
||||
if t == nil {
|
||||
return 1
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ var nilTestCases = []testCase{
|
|||
`
|
||||
package foo
|
||||
func Main() int {
|
||||
var t interface{}
|
||||
var t any
|
||||
if nil == t {
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ func TestTypeAssertReturn(t *testing.T) {
|
|||
src := `
|
||||
package main
|
||||
|
||||
func foo() interface{} {
|
||||
func foo() any {
|
||||
return 5
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ func TestSyscallExecution(t *testing.T) {
|
|||
if tc.isVoid {
|
||||
tmpl = "func %s() { %s(%s) }\n"
|
||||
} else {
|
||||
tmpl = "func %s() interface{} { return %s(%s) }\n"
|
||||
tmpl = "func %s() any { return %s(%s) }\n"
|
||||
}
|
||||
srcBuilder.WriteString(fmt.Sprintf(tmpl, realName, goName, strings.Join(tc.params, ", ")))
|
||||
}
|
||||
|
|
2
pkg/compiler/testdata/util/equals.go
vendored
2
pkg/compiler/testdata/util/equals.go
vendored
|
@ -1,6 +1,6 @@
|
|||
package util
|
||||
|
||||
// Equals is a mirror of `Equals` builtin.
|
||||
func Equals(a, b interface{}) bool {
|
||||
func Equals(a, b any) bool {
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -59,18 +59,18 @@ func TestUnderscoreLocalVarDontEmitCode(t *testing.T) {
|
|||
func (fo Foo) GetInt() int {
|
||||
return fo.Int
|
||||
}`
|
||||
eval(t, src, big.NewInt(9), []interface{}{opcode.INITSLOT, []byte{5, 0}}, // local slot for A, B, C, D, fo
|
||||
eval(t, src, big.NewInt(9), []any{opcode.INITSLOT, []byte{5, 0}}, // local slot for A, B, C, D, fo
|
||||
opcode.PUSH2, opcode.STLOC0, // store A
|
||||
opcode.PUSH5, opcode.STLOC1, // store B
|
||||
opcode.LDLOC0, opcode.LDLOC1, opcode.SWAP, []interface{}{opcode.CALL, []byte{27}}, // evaluate f() first time
|
||||
opcode.LDLOC0, opcode.LDLOC1, opcode.SWAP, []any{opcode.CALL, []byte{27}}, // evaluate f() first time
|
||||
opcode.DROP, opcode.DROP, opcode.DROP, // drop all values from f
|
||||
opcode.LDLOC0, opcode.LDLOC1, opcode.SWAP, []interface{}{opcode.CALL, []byte{19}}, // evaluate f() second time
|
||||
opcode.LDLOC0, opcode.LDLOC1, opcode.SWAP, []any{opcode.CALL, []byte{19}}, // evaluate f() second time
|
||||
opcode.DROP, opcode.STLOC2, opcode.DROP, // store C
|
||||
opcode.PUSH7, opcode.STLOC3, // store D
|
||||
opcode.LDLOC3, opcode.DROP, // empty assignment
|
||||
opcode.PUSH3, opcode.PUSH1, opcode.PACKSTRUCT, opcode.STLOC4, // fo decl
|
||||
opcode.LDLOC4, []interface{}{opcode.CALL, []byte{12}}, opcode.DROP, // fo.GetInt()
|
||||
opcode.LDLOC4, []any{opcode.CALL, []byte{12}}, opcode.DROP, // fo.GetInt()
|
||||
opcode.LDLOC2, opcode.RET, // return C
|
||||
[]interface{}{opcode.INITSLOT, []byte{0, 2}}, opcode.PUSH10, opcode.PUSH9, opcode.PUSH8, opcode.RET, // f
|
||||
[]interface{}{opcode.INITSLOT, []byte{0, 1}}, opcode.LDARG0, opcode.PUSH0, opcode.PICKITEM, opcode.RET) // (fo Foo) GetInt() int
|
||||
[]any{opcode.INITSLOT, []byte{0, 2}}, opcode.PUSH10, opcode.PUSH9, opcode.PUSH8, opcode.RET, // f
|
||||
[]any{opcode.INITSLOT, []byte{0, 1}}, opcode.LDARG0, opcode.PUSH0, opcode.PICKITEM, opcode.RET) // (fo Foo) GetInt() int
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
type testCase struct {
|
||||
name string
|
||||
src string
|
||||
result interface{}
|
||||
result any
|
||||
}
|
||||
|
||||
// testMainIdent is a method invoked in tests by default.
|
||||
|
@ -35,7 +35,7 @@ func runTestCases(t *testing.T, tcases []testCase) {
|
|||
}
|
||||
}
|
||||
|
||||
func eval(t *testing.T, src string, result interface{}, expectedOps ...interface{}) []byte {
|
||||
func eval(t *testing.T, src string, result any, expectedOps ...any) []byte {
|
||||
vm, _, script := vmAndCompileInterop(t, src)
|
||||
if len(expectedOps) != 0 {
|
||||
expected := io.NewBufBinWriter()
|
||||
|
@ -43,7 +43,7 @@ func eval(t *testing.T, src string, result interface{}, expectedOps ...interface
|
|||
switch typ := op.(type) {
|
||||
case opcode.Opcode:
|
||||
emit.Opcodes(expected.BinWriter, typ)
|
||||
case []interface{}:
|
||||
case []any:
|
||||
emit.Instruction(expected.BinWriter, typ[0].(opcode.Opcode), typ[1].([]byte))
|
||||
default:
|
||||
t.Fatalf("unexpected evaluation operation: %v", typ)
|
||||
|
@ -64,14 +64,14 @@ func evalWithError(t *testing.T, src string, e string) []byte {
|
|||
return prog
|
||||
}
|
||||
|
||||
func runAndCheck(t *testing.T, v *vm.VM, result interface{}) {
|
||||
func runAndCheck(t *testing.T, v *vm.VM, result any) {
|
||||
err := v.Run()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, 1, v.Estack().Len(), "stack contains unexpected items")
|
||||
assertResult(t, v, result)
|
||||
}
|
||||
|
||||
func evalWithArgs(t *testing.T, src string, op []byte, args []stackitem.Item, result interface{}) {
|
||||
func evalWithArgs(t *testing.T, src string, op []byte, args []stackitem.Item, result any) {
|
||||
vm := vmAndCompile(t, src)
|
||||
if len(args) > 0 {
|
||||
vm.Estack().PushVal(args)
|
||||
|
@ -82,7 +82,7 @@ func evalWithArgs(t *testing.T, src string, op []byte, args []stackitem.Item, re
|
|||
runAndCheck(t, vm, result)
|
||||
}
|
||||
|
||||
func assertResult(t *testing.T, vm *vm.VM, result interface{}) {
|
||||
func assertResult(t *testing.T, vm *vm.VM, result any) {
|
||||
assert.Equal(t, result, vm.PopResult())
|
||||
assert.Nil(t, vm.Context())
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ func NewPayload(m netmode.Magic, stateRootEnabled bool) *Payload {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *service) newPayload(c *dbft.Context, t payload.MessageType, msg interface{}) payload.ConsensusPayload {
|
||||
func (s *service) newPayload(c *dbft.Context, t payload.MessageType, msg any) payload.ConsensusPayload {
|
||||
cp := NewPayload(s.ProtocolConfiguration.Magic, s.ProtocolConfiguration.StateRootInHeader)
|
||||
cp.SetHeight(c.BlockIndex)
|
||||
cp.SetValidatorIndex(uint16(c.MyIndex))
|
||||
|
|
|
@ -65,12 +65,12 @@ func (p *Payload) SetType(t payload.MessageType) {
|
|||
}
|
||||
|
||||
// Payload implements the payload.ConsensusPayload interface.
|
||||
func (p Payload) Payload() interface{} {
|
||||
func (p Payload) Payload() any {
|
||||
return p.payload
|
||||
}
|
||||
|
||||
// SetPayload implements the payload.ConsensusPayload interface.
|
||||
func (p *Payload) SetPayload(pl interface{}) {
|
||||
func (p *Payload) SetPayload(pl any) {
|
||||
p.payload = pl.(io.Serializable)
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func trim0x(value interface{}) string {
|
||||
func trim0x(value any) string {
|
||||
s := value.(string)
|
||||
return strings.TrimPrefix(s, "0x")
|
||||
}
|
||||
|
@ -42,15 +42,15 @@ func TestDecodeBlock1(t *testing.T) {
|
|||
assert.Equal(t, trim0x(data["merkleroot"]), block.MerkleRoot.StringLE())
|
||||
assert.Equal(t, trim0x(data["nextconsensus"]), address.Uint160ToString(block.NextConsensus))
|
||||
|
||||
scripts := data["witnesses"].([]interface{})
|
||||
script := scripts[0].(map[string]interface{})
|
||||
scripts := data["witnesses"].([]any)
|
||||
script := scripts[0].(map[string]any)
|
||||
assert.Equal(t, script["invocation"].(string), base64.StdEncoding.EncodeToString(block.Script.InvocationScript))
|
||||
assert.Equal(t, script["verification"].(string), base64.StdEncoding.EncodeToString(block.Script.VerificationScript))
|
||||
|
||||
tx := data["tx"].([]interface{})
|
||||
tx0 := tx[0].(map[string]interface{})
|
||||
tx := data["tx"].([]any)
|
||||
tx0 := tx[0].(map[string]any)
|
||||
assert.Equal(t, len(tx), len(block.Transactions))
|
||||
assert.Equal(t, len(tx0["attributes"].([]interface{})), len(block.Transactions[0].Attributes))
|
||||
assert.Equal(t, len(tx0["attributes"].([]any)), len(block.Transactions[0].Attributes))
|
||||
}
|
||||
|
||||
func TestTrimmedBlock(t *testing.T) {
|
||||
|
|
|
@ -24,12 +24,12 @@ func getDecodedBlock(t *testing.T, i int) *Block {
|
|||
return block
|
||||
}
|
||||
|
||||
func getBlockData(i int) (map[string]interface{}, error) {
|
||||
func getBlockData(i int) (map[string]any, error) {
|
||||
b, err := os.ReadFile(fmt.Sprintf("../test_data/block_%d.json", i))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var data map[string]interface{}
|
||||
var data map[string]any
|
||||
if err := json.Unmarshal(b, &data); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -183,8 +183,8 @@ type Blockchain struct {
|
|||
|
||||
// Notification subsystem.
|
||||
events chan bcEvent
|
||||
subCh chan interface{}
|
||||
unsubCh chan interface{}
|
||||
subCh chan any
|
||||
unsubCh chan any
|
||||
}
|
||||
|
||||
// StateRoot represents local state root module.
|
||||
|
@ -312,8 +312,8 @@ func NewBlockchain(s storage.Store, cfg config.Blockchain, log *zap.Logger) (*Bl
|
|||
memPool: mempool.New(cfg.MemPoolSize, 0, false),
|
||||
log: log,
|
||||
events: make(chan bcEvent),
|
||||
subCh: make(chan interface{}),
|
||||
unsubCh: make(chan interface{}),
|
||||
subCh: make(chan any),
|
||||
unsubCh: make(chan any),
|
||||
contracts: *native.NewContracts(cfg.ProtocolConfiguration),
|
||||
}
|
||||
|
||||
|
@ -2334,7 +2334,7 @@ var (
|
|||
|
||||
// verifyAndPoolTx verifies whether a transaction is bonafide or not and tries
|
||||
// to add it to the mempool given.
|
||||
func (bc *Blockchain) verifyAndPoolTx(t *transaction.Transaction, pool *mempool.Pool, feer mempool.Feer, data ...interface{}) error {
|
||||
func (bc *Blockchain) verifyAndPoolTx(t *transaction.Transaction, pool *mempool.Pool, feer mempool.Feer, data ...any) error {
|
||||
// This code can technically be moved out of here, because it doesn't
|
||||
// really require a chain lock.
|
||||
err := vm.IsScriptCorrect(t.Script, nil)
|
||||
|
@ -2552,7 +2552,7 @@ func (bc *Blockchain) PoolTx(t *transaction.Transaction, pools ...*mempool.Pool)
|
|||
}
|
||||
|
||||
// PoolTxWithData verifies and tries to add given transaction with additional data into the mempool.
|
||||
func (bc *Blockchain) PoolTxWithData(t *transaction.Transaction, data interface{}, mp *mempool.Pool, feer mempool.Feer, verificationFunction func(tx *transaction.Transaction, data interface{}) error) error {
|
||||
func (bc *Blockchain) PoolTxWithData(t *transaction.Transaction, data any, mp *mempool.Pool, feer mempool.Feer, verificationFunction func(tx *transaction.Transaction, data any) error) error {
|
||||
bc.lock.RLock()
|
||||
defer bc.lock.RUnlock()
|
||||
|
||||
|
|
|
@ -1024,7 +1024,7 @@ func TestBlockchain_MPTDeleteNoKey(t *testing.T) {
|
|||
// native contract.
|
||||
func TestConfigNativeUpdateHistory(t *testing.T) {
|
||||
var prefixPath = filepath.Join("..", "..", "config")
|
||||
check := func(t *testing.T, cfgFileSuffix interface{}) {
|
||||
check := func(t *testing.T, cfgFileSuffix any) {
|
||||
cfgPath := filepath.Join(prefixPath, fmt.Sprintf("protocol.%s.yml", cfgFileSuffix))
|
||||
cfg, err := config.LoadFile(cfgPath)
|
||||
require.NoError(t, err, fmt.Errorf("failed to load %s", cfgPath))
|
||||
|
@ -1038,7 +1038,7 @@ func TestConfigNativeUpdateHistory(t *testing.T) {
|
|||
"edit the test if the contract should be disabled", cfgPath, c.Metadata().Name))
|
||||
}
|
||||
}
|
||||
testCases := []interface{}{
|
||||
testCases := []any{
|
||||
netmode.MainNet,
|
||||
netmode.PrivNet,
|
||||
netmode.TestNet,
|
||||
|
@ -1390,7 +1390,7 @@ func TestBlockchain_VerifyTx(t *testing.T) {
|
|||
checkErr(t, core.ErrInvalidAttribute, tx)
|
||||
})
|
||||
|
||||
keys := make([]interface{}, 0, len(oraclePubs))
|
||||
keys := make([]any, 0, len(oraclePubs))
|
||||
for _, p := range oraclePubs {
|
||||
keys = append(keys, p.Bytes())
|
||||
}
|
||||
|
@ -1612,7 +1612,7 @@ func TestBlockchain_VerifyTx(t *testing.T) {
|
|||
notary, err := wallet.NewAccount()
|
||||
require.NoError(t, err)
|
||||
designateSuperInvoker.Invoke(t, stackitem.Null{}, "designateAsRole",
|
||||
int64(noderoles.P2PNotary), []interface{}{notary.PublicKey().Bytes()})
|
||||
int64(noderoles.P2PNotary), []any{notary.PublicKey().Bytes()})
|
||||
txSetNotary := transaction.New([]byte{byte(opcode.RET)}, 0)
|
||||
txSetNotary.Signers = []transaction.Signer{
|
||||
{
|
||||
|
@ -1861,7 +1861,7 @@ func TestBlockchain_VerifyTx(t *testing.T) {
|
|||
}
|
||||
|
||||
mp := mempool.New(10, 1, false)
|
||||
verificationF := func(tx *transaction.Transaction, data interface{}) error {
|
||||
verificationF := func(tx *transaction.Transaction, data any) error {
|
||||
if data.(int) > 5 {
|
||||
return errors.New("bad data")
|
||||
}
|
||||
|
@ -1909,7 +1909,7 @@ func TestBlockchain_Bug1728(t *testing.T) {
|
|||
src := `package example
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
||||
func init() { if true { } else { } }
|
||||
func _deploy(_ interface{}, isUpdate bool) {
|
||||
func _deploy(_ any, isUpdate bool) {
|
||||
runtime.Log("Deploy")
|
||||
}`
|
||||
c := neotest.CompileSource(t, acc.ScriptHash(), strings.NewReader(src), &compiler.Options{Name: "TestContract"})
|
||||
|
|
|
@ -63,7 +63,7 @@ func TestCreateMultisigAccount(t *testing.T) {
|
|||
e := neotest.NewExecutor(t, bc, acc, acc)
|
||||
w := io.NewBufBinWriter()
|
||||
|
||||
createScript := func(t *testing.T, pubs []interface{}, m int) []byte {
|
||||
createScript := func(t *testing.T, pubs []any, m int) []byte {
|
||||
w.Reset()
|
||||
emit.Array(w.BinWriter, pubs...)
|
||||
emit.Int(w.BinWriter, int64(m))
|
||||
|
@ -74,7 +74,7 @@ func TestCreateMultisigAccount(t *testing.T) {
|
|||
t.Run("Good", func(t *testing.T) {
|
||||
m, n := 3, 5
|
||||
pubs := make(keys.PublicKeys, n)
|
||||
arr := make([]interface{}, n)
|
||||
arr := make([]any, n)
|
||||
for i := range pubs {
|
||||
pk, err := keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
|
@ -94,13 +94,13 @@ func TestCreateMultisigAccount(t *testing.T) {
|
|||
require.Equal(t, hash.Hash160(expected), u)
|
||||
})
|
||||
t.Run("InvalidKey", func(t *testing.T) {
|
||||
script := createScript(t, []interface{}{[]byte{1, 2, 3}}, 1)
|
||||
script := createScript(t, []any{[]byte{1, 2, 3}}, 1)
|
||||
e.InvokeScriptCheckFAULT(t, script, []neotest.Signer{acc}, "invalid prefix 1")
|
||||
})
|
||||
t.Run("Invalid m", func(t *testing.T) {
|
||||
pk, err := keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
script := createScript(t, []interface{}{pk.PublicKey().Bytes()}, 2)
|
||||
script := createScript(t, []any{pk.PublicKey().Bytes()}, 2)
|
||||
e.InvokeScriptCheckFAULT(t, script, []neotest.Signer{acc}, "length of the signatures (2) is higher then the number of public keys")
|
||||
})
|
||||
t.Run("m overflows int32", func(t *testing.T) {
|
||||
|
@ -131,7 +131,7 @@ func TestCreateAccount_Hardfork(t *testing.T) {
|
|||
pub := priv.PublicKey()
|
||||
|
||||
w := io.NewBufBinWriter()
|
||||
emit.Array(w.BinWriter, []interface{}{pub.Bytes(), pub.Bytes(), pub.Bytes()}...)
|
||||
emit.Array(w.BinWriter, []any{pub.Bytes(), pub.Bytes(), pub.Bytes()}...)
|
||||
emit.Int(w.BinWriter, int64(2))
|
||||
emit.Syscall(w.BinWriter, interopnames.SystemContractCreateMultisigAccount)
|
||||
require.NoError(t, w.Err)
|
||||
|
|
|
@ -90,7 +90,7 @@ func TestCall(t *testing.T) {
|
|||
require.Error(t, contract.Call(ic))
|
||||
})
|
||||
|
||||
runInvalid := func(args ...interface{}) func(t *testing.T) {
|
||||
runInvalid := func(args ...any) func(t *testing.T) {
|
||||
return func(t *testing.T) {
|
||||
loadScriptWithHashAndFlags(ic, currScript, h, callflag.All, 42)
|
||||
for i := range args {
|
||||
|
@ -591,7 +591,7 @@ func TestCALLL_from_VoidContext(t *testing.T) {
|
|||
ctrInvoker.Invoke(t, stackitem.Null{}, "callHasRet")
|
||||
}
|
||||
|
||||
func loadScript(ic *interop.Context, script []byte, args ...interface{}) {
|
||||
func loadScript(ic *interop.Context, script []byte, args ...any) {
|
||||
ic.SpawnVM()
|
||||
ic.VM.LoadScriptWithFlags(script, callflag.AllowCall)
|
||||
for i := range args {
|
||||
|
@ -600,7 +600,7 @@ func loadScript(ic *interop.Context, script []byte, args ...interface{}) {
|
|||
ic.VM.GasLimit = -1
|
||||
}
|
||||
|
||||
func loadScriptWithHashAndFlags(ic *interop.Context, script []byte, hash util.Uint160, f callflag.CallFlag, args ...interface{}) {
|
||||
func loadScriptWithHashAndFlags(ic *interop.Context, script []byte, hash util.Uint160, f callflag.CallFlag, args ...any) {
|
||||
ic.SpawnVM()
|
||||
ic.VM.LoadScriptWithHash(script, hash, f)
|
||||
for i := range args {
|
||||
|
|
|
@ -180,7 +180,7 @@ func TestCheckSig(t *testing.T) {
|
|||
verifyFunc := ECDSASecp256r1CheckSig
|
||||
d := dao.NewSimple(storage.NewMemoryStore(), false, false)
|
||||
ic := &interop.Context{Network: uint32(netmode.UnitTestNet), DAO: d}
|
||||
runCase := func(t *testing.T, isErr bool, result interface{}, args ...interface{}) {
|
||||
runCase := func(t *testing.T, isErr bool, result any, args ...any) {
|
||||
ic.SpawnVM()
|
||||
for i := range args {
|
||||
ic.VM.Estack().PushVal(args[i])
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
"go.uber.org/zap/zaptest"
|
||||
)
|
||||
|
||||
func checkStack(t *testing.T, v *vm.VM, args ...interface{}) {
|
||||
func checkStack(t *testing.T, v *vm.VM, args ...any) {
|
||||
require.Equal(t, len(args), v.Estack().Len())
|
||||
for i := range args {
|
||||
require.Equal(t, stackitem.Make(args[i]), v.Estack().Pop().Item(), "%d", i)
|
||||
|
@ -122,7 +122,7 @@ func TestLog(t *testing.T) {
|
|||
ls := buf.Lines()
|
||||
require.Equal(t, 1, len(ls))
|
||||
|
||||
var logMsg map[string]interface{}
|
||||
var logMsg map[string]any
|
||||
require.NoError(t, json.Unmarshal([]byte(ls[0]), &logMsg))
|
||||
require.Equal(t, "info", logMsg["level"])
|
||||
require.Equal(t, "hello", logMsg["msg"])
|
||||
|
|
|
@ -71,7 +71,7 @@ func createVM(t testing.TB) (*vm.VM, *interop.Context, *core.Blockchain) {
|
|||
return v, ic, chain
|
||||
}
|
||||
|
||||
func loadScriptWithHashAndFlags(ic *interop.Context, script []byte, hash util.Uint160, f callflag.CallFlag, args ...interface{}) {
|
||||
func loadScriptWithHashAndFlags(ic *interop.Context, script []byte, hash util.Uint160, f callflag.CallFlag, args ...any) {
|
||||
ic.SpawnVM()
|
||||
ic.VM.LoadScriptWithHash(script, hash, f)
|
||||
for i := range args {
|
||||
|
@ -80,7 +80,7 @@ func loadScriptWithHashAndFlags(ic *interop.Context, script []byte, hash util.Ui
|
|||
ic.VM.GasLimit = -1
|
||||
}
|
||||
|
||||
func wrapDynamicScript(t *testing.T, script []byte, flags callflag.CallFlag, args ...interface{}) []byte {
|
||||
func wrapDynamicScript(t *testing.T, script []byte, flags callflag.CallFlag, args ...any) []byte {
|
||||
b := io.NewBufBinWriter()
|
||||
|
||||
// Params.
|
||||
|
@ -150,7 +150,7 @@ func TestCheckWitness(t *testing.T) {
|
|||
|
||||
script := []byte{byte(opcode.RET)}
|
||||
scriptHash := hash.Hash160(script)
|
||||
check := func(t *testing.T, ic *interop.Context, arg interface{}, shouldFail bool, expected ...bool) {
|
||||
check := func(t *testing.T, ic *interop.Context, arg any, shouldFail bool, expected ...bool) {
|
||||
ic.VM.Estack().PushVal(arg)
|
||||
err := runtime.CheckWitness(ic)
|
||||
if shouldFail {
|
||||
|
@ -632,7 +632,7 @@ func TestGetRandomCompatibility(t *testing.T) {
|
|||
|
||||
func TestNotify(t *testing.T) {
|
||||
caller := random.Uint160()
|
||||
newIC := func(name string, args interface{}) *interop.Context {
|
||||
newIC := func(name string, args any) *interop.Context {
|
||||
_, _, bc, cs := getDeployedInternal(t)
|
||||
ic, err := bc.GetTestVM(trigger.Application, nil, nil)
|
||||
require.NoError(t, err)
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
)
|
||||
|
||||
func TestUnexpectedNonInterops(t *testing.T) {
|
||||
vals := map[string]interface{}{
|
||||
vals := map[string]any{
|
||||
"int": 1,
|
||||
"bool": false,
|
||||
"string": "smth",
|
||||
|
|
|
@ -41,7 +41,7 @@ var (
|
|||
type item struct {
|
||||
txn *transaction.Transaction
|
||||
blockStamp uint32
|
||||
data interface{}
|
||||
data any
|
||||
}
|
||||
|
||||
// items is a slice of an item.
|
||||
|
@ -70,7 +70,7 @@ type Pool struct {
|
|||
payerIndex int
|
||||
|
||||
resendThreshold uint32
|
||||
resendFunc func(*transaction.Transaction, interface{})
|
||||
resendFunc func(*transaction.Transaction, any)
|
||||
|
||||
// subscriptions for mempool events
|
||||
subscriptionsEnabled bool
|
||||
|
@ -197,7 +197,7 @@ func checkBalance(tx *transaction.Transaction, balance utilityBalanceAndFees) (u
|
|||
}
|
||||
|
||||
// Add tries to add the given transaction to the Pool.
|
||||
func (mp *Pool) Add(t *transaction.Transaction, fee Feer, data ...interface{}) error {
|
||||
func (mp *Pool) Add(t *transaction.Transaction, fee Feer, data ...any) error {
|
||||
var pItem = item{
|
||||
txn: t,
|
||||
blockStamp: fee.BlockHeight(),
|
||||
|
@ -441,7 +441,7 @@ func New(capacity int, payerIndex int, enableSubscriptions bool) *Pool {
|
|||
|
||||
// SetResendThreshold sets a threshold after which the transaction will be considered stale
|
||||
// and returned for retransmission by `GetStaleTransactions`.
|
||||
func (mp *Pool) SetResendThreshold(h uint32, f func(*transaction.Transaction, interface{})) {
|
||||
func (mp *Pool) SetResendThreshold(h uint32, f func(*transaction.Transaction, any)) {
|
||||
mp.lock.Lock()
|
||||
defer mp.lock.Unlock()
|
||||
mp.resendThreshold = h
|
||||
|
@ -466,7 +466,7 @@ func (mp *Pool) TryGetValue(hash util.Uint256) (*transaction.Transaction, bool)
|
|||
}
|
||||
|
||||
// TryGetData returns data associated with the specified transaction if it exists in the memory pool.
|
||||
func (mp *Pool) TryGetData(hash util.Uint256) (interface{}, bool) {
|
||||
func (mp *Pool) TryGetData(hash util.Uint256) (any, bool) {
|
||||
mp.lock.RLock()
|
||||
defer mp.lock.RUnlock()
|
||||
if tx, ok := mp.verifiedMap[hash]; ok {
|
||||
|
|
|
@ -76,7 +76,7 @@ func TestMemPoolRemoveStale(t *testing.T) {
|
|||
}
|
||||
|
||||
staleTxs := make(chan *transaction.Transaction, 5)
|
||||
f := func(tx *transaction.Transaction, _ interface{}) {
|
||||
f := func(tx *transaction.Transaction, _ any) {
|
||||
staleTxs <- tx
|
||||
}
|
||||
mp.SetResendThreshold(5, f)
|
||||
|
|
|
@ -21,7 +21,7 @@ const (
|
|||
type Event struct {
|
||||
Type Type
|
||||
Tx *transaction.Transaction
|
||||
Data interface{}
|
||||
Data any
|
||||
}
|
||||
|
||||
// String is a Stringer implementation.
|
||||
|
|
|
@ -29,7 +29,7 @@ func (e EmptyNode) MarshalJSON() ([]byte, error) {
|
|||
|
||||
// UnmarshalJSON implements Node interface.
|
||||
func (e EmptyNode) UnmarshalJSON(bytes []byte) error {
|
||||
var m map[string]interface{}
|
||||
var m map[string]any
|
||||
err := json.Unmarshal(bytes, &m)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -80,7 +80,7 @@ func (e *ExtensionNode) Size() int {
|
|||
|
||||
// MarshalJSON implements the json.Marshaler.
|
||||
func (e *ExtensionNode) MarshalJSON() ([]byte, error) {
|
||||
m := map[string]interface{}{
|
||||
m := map[string]any{
|
||||
"key": hex.EncodeToString(e.key),
|
||||
"next": e.next,
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ func testECDSAVerify(t *testing.T, curve NamedCurve) {
|
|||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
runCase := func(t *testing.T, isErr bool, result interface{}, args ...interface{}) {
|
||||
runCase := func(t *testing.T, isErr bool, result any, args ...any) {
|
||||
argsArr := make([]stackitem.Item, len(args))
|
||||
for i := range args {
|
||||
argsArr[i] = stackitem.Make(args[i])
|
||||
|
|
|
@ -113,7 +113,7 @@ func testGetSetCache(t *testing.T, c *neotest.ContractInvoker, name string, defa
|
|||
}
|
||||
|
||||
func setNodesByRole(t *testing.T, designateInvoker *neotest.ContractInvoker, ok bool, r noderoles.Role, nodes keys.PublicKeys) {
|
||||
pubs := make([]interface{}, len(nodes))
|
||||
pubs := make([]any, len(nodes))
|
||||
for i := range nodes {
|
||||
pubs[i] = nodes[i].Bytes()
|
||||
}
|
||||
|
|
|
@ -106,11 +106,11 @@ func TestDesignate_Cache(t *testing.T) {
|
|||
}
|
||||
privGood, err := keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
pubsGood := []interface{}{privGood.PublicKey().Bytes()}
|
||||
pubsGood := []any{privGood.PublicKey().Bytes()}
|
||||
|
||||
privBad, err := keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
pubsBad := []interface{}{privBad.PublicKey().Bytes()}
|
||||
pubsBad := []any{privBad.PublicKey().Bytes()}
|
||||
|
||||
// Firstly, designate good Oracle node and check that OracleService callback was called during PostPersist.
|
||||
e.Chain.SetOracle(oracleServ)
|
||||
|
|
|
@ -78,7 +78,7 @@ func TestGAS_RewardWithP2PSigExtensionsEnabled(t *testing.T) {
|
|||
|
||||
// set Notary nodes and check their balance
|
||||
notaryNodes := make([]*keys.PrivateKey, nNotaries)
|
||||
notaryNodesPublicKeys := make([]interface{}, nNotaries)
|
||||
notaryNodesPublicKeys := make([]any, nNotaries)
|
||||
var err error
|
||||
for i := range notaryNodes {
|
||||
notaryNodes[i], err = keys.NewPrivateKey()
|
||||
|
@ -92,7 +92,7 @@ func TestGAS_RewardWithP2PSigExtensionsEnabled(t *testing.T) {
|
|||
|
||||
// deposit GAS for `signer` with lock until the next block
|
||||
depositAmount := 100_0000 + (2+int64(nKeys))*notaryServiceFeePerKey // sysfee + netfee of the next transaction
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", e.CommitteeHash, notaryHash, depositAmount, []interface{}{e.CommitteeHash, e.Chain.BlockHeight() + 1})
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", e.CommitteeHash, notaryHash, depositAmount, []any{e.CommitteeHash, e.Chain.BlockHeight() + 1})
|
||||
|
||||
// save initial GAS total supply
|
||||
getGASTS := func(t *testing.T) int64 {
|
||||
|
|
|
@ -98,7 +98,7 @@ func TestManagement_ContractDeploy(t *testing.T) {
|
|||
managementInvoker.InvokeFail(t, "invalid NEF file", "deploy", []byte{}, manifestBytes)
|
||||
})
|
||||
t.Run("array for NEF", func(t *testing.T) {
|
||||
managementInvoker.InvokeFail(t, "invalid NEF file", "deploy", []interface{}{int64(1)}, manifestBytes)
|
||||
managementInvoker.InvokeFail(t, "invalid NEF file", "deploy", []any{int64(1)}, manifestBytes)
|
||||
})
|
||||
t.Run("bad script in NEF", func(t *testing.T) {
|
||||
nf, err := nef.FileFromBytes(nefBytes) // make a full copy
|
||||
|
@ -116,7 +116,7 @@ func TestManagement_ContractDeploy(t *testing.T) {
|
|||
managementInvoker.InvokeFail(t, "invalid manifest", "deploy", nefBytes, []byte{})
|
||||
})
|
||||
t.Run("array for manifest", func(t *testing.T) {
|
||||
managementInvoker.InvokeFail(t, "invalid manifest", "deploy", nefBytes, []interface{}{int64(1)})
|
||||
managementInvoker.InvokeFail(t, "invalid manifest", "deploy", nefBytes, []any{int64(1)})
|
||||
})
|
||||
t.Run("non-utf8 manifest", func(t *testing.T) {
|
||||
manifestBad := bytes.Replace(manifestBytes, []byte("TestMain"), []byte("\xff\xfe\xfd"), 1) // Replace name.
|
||||
|
@ -549,7 +549,7 @@ func TestManagement_GetContract(t *testing.T) {
|
|||
managementInvoker.Invoke(t, si, "deploy", nefBytes, manifestBytes)
|
||||
|
||||
t.Run("bad parameter type", func(t *testing.T) {
|
||||
managementInvoker.InvokeFail(t, "invalid conversion: Array/ByteString", "getContract", []interface{}{int64(1)})
|
||||
managementInvoker.InvokeFail(t, "invalid conversion: Array/ByteString", "getContract", []any{int64(1)})
|
||||
})
|
||||
t.Run("not a hash", func(t *testing.T) {
|
||||
managementInvoker.InvokeFail(t, "expected byte size of 20 got 3", "getContract", []byte{1, 2, 3})
|
||||
|
@ -558,7 +558,7 @@ func TestManagement_GetContract(t *testing.T) {
|
|||
managementInvoker.Invoke(t, si, "getContract", cs1.Hash.BytesBE())
|
||||
})
|
||||
t.Run("by ID, bad parameter type", func(t *testing.T) {
|
||||
managementInvoker.InvokeFail(t, "invalid conversion: Array/Integer", "getContractById", []interface{}{int64(1)})
|
||||
managementInvoker.InvokeFail(t, "invalid conversion: Array/Integer", "getContractById", []any{int64(1)})
|
||||
})
|
||||
t.Run("by ID, bad num", func(t *testing.T) {
|
||||
managementInvoker.InvokeFail(t, "id is not a correct int32", "getContractById", []byte{1, 2, 3, 4, 5})
|
||||
|
|
|
@ -75,19 +75,19 @@ func TestNotary_Pipeline(t *testing.T) {
|
|||
notaryCommitteeInvoker.Invoke(t, false, "lockDepositUntil", multisigHash, int64(depositLock+1))
|
||||
|
||||
// `onPayment`: bad token
|
||||
neoCommitteeInvoker.InvokeFail(t, "only GAS can be accepted for deposit", "transfer", multisigHash, notaryHash, int64(1), []interface{}{nil, int64(depositLock)})
|
||||
neoCommitteeInvoker.InvokeFail(t, "only GAS can be accepted for deposit", "transfer", multisigHash, notaryHash, int64(1), []any{nil, int64(depositLock)})
|
||||
|
||||
// `onPayment`: insufficient first deposit
|
||||
gasCommitteeInvoker.InvokeFail(t, "first deposit can not be less then", "transfer", multisigHash, notaryHash, int64(2*feePerKey-1), []interface{}{nil, int64(depositLock)})
|
||||
gasCommitteeInvoker.InvokeFail(t, "first deposit can not be less then", "transfer", multisigHash, notaryHash, int64(2*feePerKey-1), []any{nil, int64(depositLock)})
|
||||
|
||||
// `onPayment`: invalid `data` (missing `till` parameter)
|
||||
gasCommitteeInvoker.InvokeFail(t, "`data` parameter should be an array of 2 elements", "transfer", multisigHash, notaryHash, 2*feePerKey, []interface{}{nil})
|
||||
gasCommitteeInvoker.InvokeFail(t, "`data` parameter should be an array of 2 elements", "transfer", multisigHash, notaryHash, 2*feePerKey, []any{nil})
|
||||
|
||||
// `onPayment`: invalid `data` (outdated `till` parameter)
|
||||
gasCommitteeInvoker.InvokeFail(t, "`till` shouldn't be less then the chain's height", "transfer", multisigHash, notaryHash, 2*feePerKey, []interface{}{nil, int64(0)})
|
||||
gasCommitteeInvoker.InvokeFail(t, "`till` shouldn't be less then the chain's height", "transfer", multisigHash, notaryHash, 2*feePerKey, []any{nil, int64(0)})
|
||||
|
||||
// `onPayment`: good
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, 2*feePerKey, []interface{}{nil, int64(depositLock)})
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, 2*feePerKey, []any{nil, int64(depositLock)})
|
||||
checkBalanceOf(t, notaryHash, 2*feePerKey)
|
||||
|
||||
// `expirationOf`: check `till` was set
|
||||
|
@ -97,7 +97,7 @@ func TestNotary_Pipeline(t *testing.T) {
|
|||
notaryCommitteeInvoker.Invoke(t, 2*feePerKey, "balanceOf", multisigHash)
|
||||
|
||||
// `onPayment`: good second deposit and explicit `to` paramenter
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, feePerKey, []interface{}{multisigHash, int64(depositLock + 1)})
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, feePerKey, []any{multisigHash, int64(depositLock + 1)})
|
||||
checkBalanceOf(t, notaryHash, 3*feePerKey)
|
||||
|
||||
// `balanceOf`: check deposited amount for the multisig account
|
||||
|
@ -107,17 +107,17 @@ func TestNotary_Pipeline(t *testing.T) {
|
|||
notaryCommitteeInvoker.Invoke(t, depositLock+1, "expirationOf", multisigHash)
|
||||
|
||||
// `onPayment`: empty payment, should fail because `till` less then the previous one
|
||||
gasCommitteeInvoker.InvokeFail(t, "`till` shouldn't be less then the previous value", "transfer", multisigHash, notaryHash, int64(0), []interface{}{multisigHash, int64(depositLock)})
|
||||
gasCommitteeInvoker.InvokeFail(t, "`till` shouldn't be less then the previous value", "transfer", multisigHash, notaryHash, int64(0), []any{multisigHash, int64(depositLock)})
|
||||
checkBalanceOf(t, notaryHash, 3*feePerKey)
|
||||
notaryCommitteeInvoker.Invoke(t, depositLock+1, "expirationOf", multisigHash)
|
||||
|
||||
// `onPayment`: empty payment, should fail because `till` less then the chain height
|
||||
gasCommitteeInvoker.InvokeFail(t, "`till` shouldn't be less then the chain's height", "transfer", multisigHash, notaryHash, int64(0), []interface{}{multisigHash, int64(1)})
|
||||
gasCommitteeInvoker.InvokeFail(t, "`till` shouldn't be less then the chain's height", "transfer", multisigHash, notaryHash, int64(0), []any{multisigHash, int64(1)})
|
||||
checkBalanceOf(t, notaryHash, 3*feePerKey)
|
||||
notaryCommitteeInvoker.Invoke(t, depositLock+1, "expirationOf", multisigHash)
|
||||
|
||||
// `onPayment`: empty payment, should successfully update `till`
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, int64(0), []interface{}{multisigHash, int64(depositLock + 2)})
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, int64(0), []any{multisigHash, int64(depositLock + 2)})
|
||||
checkBalanceOf(t, notaryHash, 3*feePerKey)
|
||||
notaryCommitteeInvoker.Invoke(t, depositLock+2, "expirationOf", multisigHash)
|
||||
|
||||
|
@ -159,12 +159,12 @@ func TestNotary_Pipeline(t *testing.T) {
|
|||
notaryCommitteeInvoker.Invoke(t, false, "withdraw", multisigHash, accHash)
|
||||
|
||||
// `onPayment`: good first deposit to other account, should set default `till` even if other `till` value is provided
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, 2*feePerKey, []interface{}{accHash, int64(math.MaxUint32 - 1)})
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, 2*feePerKey, []any{accHash, int64(math.MaxUint32 - 1)})
|
||||
checkBalanceOf(t, notaryHash, 2*feePerKey)
|
||||
notaryCommitteeInvoker.Invoke(t, 5760+e.Chain.BlockHeight()-1, "expirationOf", accHash)
|
||||
|
||||
// `onPayment`: good second deposit to other account, shouldn't update `till` even if other `till` value is provided
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, feePerKey, []interface{}{accHash, int64(math.MaxUint32 - 1)})
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, feePerKey, []any{accHash, int64(math.MaxUint32 - 1)})
|
||||
checkBalanceOf(t, notaryHash, 3*feePerKey)
|
||||
notaryCommitteeInvoker.Invoke(t, 5760+e.Chain.BlockHeight()-3, "expirationOf", accHash)
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ func TestNotary_NotaryNodesReward(t *testing.T) {
|
|||
|
||||
// set Notary nodes and check their balance
|
||||
notaryNodes := make([]*keys.PrivateKey, nNotaryNodes)
|
||||
notaryNodesPublicKeys := make([]interface{}, nNotaryNodes)
|
||||
notaryNodesPublicKeys := make([]any, nNotaryNodes)
|
||||
for i := range notaryNodes {
|
||||
notaryNodes[i], err = keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
|
@ -201,7 +201,7 @@ func TestNotary_NotaryNodesReward(t *testing.T) {
|
|||
if !spendFullDeposit {
|
||||
depositAmount += 1_0000
|
||||
}
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, depositAmount, []interface{}{multisigHash, e.Chain.BlockHeight() + 1})
|
||||
gasCommitteeInvoker.Invoke(t, true, "transfer", multisigHash, notaryHash, depositAmount, []any{multisigHash, e.Chain.BlockHeight() + 1})
|
||||
|
||||
// send transaction with Notary contract as a sender
|
||||
tx := transaction.New([]byte{byte(opcode.PUSH1)}, 1_000_000)
|
||||
|
|
|
@ -36,7 +36,7 @@ func TestOracle_GetSetPriceCache(t *testing.T) {
|
|||
|
||||
func putOracleRequest(t *testing.T, oracleInvoker *neotest.ContractInvoker,
|
||||
url string, filter *string, cb string, userData []byte, gas int64, errStr ...string) {
|
||||
var filtItem interface{}
|
||||
var filtItem any
|
||||
if filter != nil {
|
||||
filtItem = *filter
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ func TestOracle_Request(t *testing.T) {
|
|||
|
||||
// Designate single Oracle node.
|
||||
oracleNode := e.NewAccount(t)
|
||||
designationCommitteeInvoker.Invoke(t, stackitem.Null{}, "designateAsRole", int(noderoles.Oracle), []interface{}{oracleNode.(neotest.SingleSigner).Account().PublicKey().Bytes()})
|
||||
designationCommitteeInvoker.Invoke(t, stackitem.Null{}, "designateAsRole", int(noderoles.Oracle), []any{oracleNode.(neotest.SingleSigner).Account().PublicKey().Bytes()})
|
||||
err = oracleNode.(neotest.SingleSigner).Account().ConvertMultisig(1, []*keys.PublicKey{oracleNode.(neotest.SingleSigner).Account().PublicKey()})
|
||||
require.NoError(t, err)
|
||||
oracleNodeMulti := neotest.NewMultiSigner(oracleNode.(neotest.SingleSigner).Account())
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func getInvalidTestFunc(actual stackitem.Convertible, value interface{}) func(t *testing.T) {
|
||||
func getInvalidTestFunc(actual stackitem.Convertible, value any) func(t *testing.T) {
|
||||
return func(t *testing.T) {
|
||||
it := stackitem.Make(value)
|
||||
require.Error(t, actual.FromStackItem(it))
|
||||
|
|
|
@ -306,7 +306,7 @@ func TestStdLibSerializeDeserialize(t *testing.T) {
|
|||
ic := &interop.Context{VM: vm.New(), DAO: &dao.Simple{}}
|
||||
var actual stackitem.Item
|
||||
|
||||
checkSerializeDeserialize := func(t *testing.T, value interface{}, expected stackitem.Item) {
|
||||
checkSerializeDeserialize := func(t *testing.T, value any, expected stackitem.Item) {
|
||||
require.NotPanics(t, func() {
|
||||
actual = s.serialize(ic, []stackitem.Item{stackitem.Make(value)})
|
||||
})
|
||||
|
@ -427,7 +427,7 @@ func TestMemorySearch(t *testing.T) {
|
|||
s := newStd()
|
||||
ic := &interop.Context{VM: vm.New()}
|
||||
|
||||
check := func(t *testing.T, result int64, args ...interface{}) {
|
||||
check := func(t *testing.T, result int64, args ...any) {
|
||||
items := make([]stackitem.Item, len(args))
|
||||
for i := range args {
|
||||
items[i] = stackitem.Make(args[i])
|
||||
|
@ -519,7 +519,7 @@ func TestStringSplit(t *testing.T) {
|
|||
s := newStd()
|
||||
ic := &interop.Context{VM: vm.New()}
|
||||
|
||||
check := func(t *testing.T, result []string, str, sep string, remove interface{}) {
|
||||
check := func(t *testing.T, result []string, str, sep string, remove any) {
|
||||
args := []stackitem.Item{stackitem.Make(str), stackitem.Make(sep)}
|
||||
var actual stackitem.Item
|
||||
if remove == nil {
|
||||
|
|
|
@ -17,7 +17,7 @@ type Attribute struct {
|
|||
// Anonymous interface fields are not considered anonymous by
|
||||
// json lib and marshaling Value together with type makes code
|
||||
// harder to follow.
|
||||
toJSONMap(map[string]interface{})
|
||||
toJSONMap(map[string]any)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ func (attr *Attribute) EncodeBinary(bw *io.BinWriter) {
|
|||
|
||||
// MarshalJSON implements the json Marshaller interface.
|
||||
func (attr *Attribute) MarshalJSON() ([]byte, error) {
|
||||
m := map[string]interface{}{"type": attr.Type.String()}
|
||||
m := map[string]any{"type": attr.Type.String()}
|
||||
if attr.Value != nil {
|
||||
attr.Value.toJSONMap(m)
|
||||
}
|
||||
|
|
|
@ -20,6 +20,6 @@ func (c *Conflicts) EncodeBinary(w *io.BinWriter) {
|
|||
c.Hash.EncodeBinary(w)
|
||||
}
|
||||
|
||||
func (c *Conflicts) toJSONMap(m map[string]interface{}) {
|
||||
func (c *Conflicts) toJSONMap(m map[string]any) {
|
||||
m["hash"] = c.Hash
|
||||
}
|
||||
|
|
|
@ -19,6 +19,6 @@ func (n *NotValidBefore) EncodeBinary(w *io.BinWriter) {
|
|||
w.WriteU32LE(n.Height)
|
||||
}
|
||||
|
||||
func (n *NotValidBefore) toJSONMap(m map[string]interface{}) {
|
||||
func (n *NotValidBefore) toJSONMap(m map[string]any) {
|
||||
m["height"] = n.Height
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue