[#98] nns: add Version method

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-22 15:08:51 +03:00 committed by Alex Vanin
parent 2cb10edfd2
commit edbd137340

View file

@ -19,6 +19,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/interop/runtime" "github.com/nspcc-dev/neo-go/pkg/interop/runtime"
"github.com/nspcc-dev/neo-go/pkg/interop/storage" "github.com/nspcc-dev/neo-go/pkg/interop/storage"
"github.com/nspcc-dev/neo-go/pkg/interop/util" "github.com/nspcc-dev/neo-go/pkg/interop/util"
"github.com/nspcc-dev/neofs-contract/common"
) )
// Prefixes used for contract data storage. // Prefixes used for contract data storage.
@ -131,6 +132,11 @@ func Decimals() int {
return 0 return 0
} }
// Version returns version of the contract.
func Version() int {
return common.Version
}
// TotalSupply returns overall number of domains minted by the NeoNameService contract. // TotalSupply returns overall number of domains minted by the NeoNameService contract.
func TotalSupply() int { func TotalSupply() int {
ctx := storage.GetReadOnlyContext() ctx := storage.GetReadOnlyContext()