mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 13:38:35 +00:00
150041d25e
This method is used only from Management contract. We also have neotest-based tests for `getMinimumDeploymentFee`, it should be enough.
30 lines
872 B
Go
30 lines
872 B
Go
package core
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/storage"
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
type memoryStore struct {
|
|
*storage.MemoryStore
|
|
}
|
|
|
|
func (memoryStore) Close() error { return nil }
|
|
|
|
func TestManagement_GetNEP17Contracts(t *testing.T) {
|
|
t.Run("empty chain", func(t *testing.T) {
|
|
chain := newTestChain(t)
|
|
require.ElementsMatch(t, []util.Uint160{chain.contracts.NEO.Hash, chain.contracts.GAS.Hash}, chain.contracts.Management.GetNEP17Contracts())
|
|
})
|
|
|
|
t.Run("test chain", func(t *testing.T) {
|
|
chain := newTestChain(t)
|
|
initBasicChain(t, chain)
|
|
rublesHash, err := chain.GetContractScriptHash(1)
|
|
require.NoError(t, err)
|
|
require.ElementsMatch(t, []util.Uint160{chain.contracts.NEO.Hash, chain.contracts.GAS.Hash, rublesHash}, chain.contracts.Management.GetNEP17Contracts())
|
|
})
|
|
}
|