native: change contract names, move them to separate package

Follow neo-project/neo#2138 and make RPC client's GetNativeContractHash
case-sensitive.
This commit is contained in:
Roman Khimov 2020-12-13 21:25:04 +03:00
parent aff1469482
commit cf8cf93e7a
20 changed files with 66 additions and 52 deletions

View file

@ -7,6 +7,7 @@ import (
"github.com/nspcc-dev/neo-go/internal/testchain"
"github.com/nspcc-dev/neo-go/pkg/core/fee"
"github.com/nspcc-dev/neo-go/pkg/core/native/nativenames"
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
"github.com/nspcc-dev/neo-go/pkg/crypto/hash"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
@ -266,7 +267,7 @@ func TestCreateNEP17TransferTx(t *testing.T) {
priv := testchain.PrivateKeyByID(0)
acc := wallet.NewAccountFromPrivateKey(priv)
gasContractHash, err := c.GetNativeContractHash("gas")
gasContractHash, err := c.GetNativeContractHash(nativenames.Gas)
require.NoError(t, err)
tx, err := c.CreateNEP17TransferTx(acc, util.Uint160{}, gasContractHash, 1000, 0)