Add Version() method to the policy contract #68

Merged
fyrchik merged 2 commits from fyrchik/frostfs-contract:fix-policy-version into master 2024-09-04 19:51:17 +00:00
12 changed files with 31 additions and 20 deletions

View file

@ -4,3 +4,4 @@ safemethods:
- "listChains"
- "getChain"
- "listChainsByPrefix"
- "version"

View file

@ -58,6 +58,11 @@ func checkAuthorization(ctx storage.Context) {
panic(ErrNotAuthorized)
}
// Version returns the version of the contract.
func Version() int {
return common.Version
}
func SetAdmin(addr interop.Hash160) {
common.CheckAlphabetWitness()

View file

@ -1,6 +1,6 @@
// Package alphabet contains RPC wrappers for Alphabet contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package alphabet contains RPC wrappers for Alphabet contract.
package alphabet
import (

View file

@ -1,6 +1,6 @@
// Package balance contains RPC wrappers for Balance contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package balance contains RPC wrappers for Balance contract.
package balance
import (

View file

@ -1,6 +1,6 @@
// Package container contains RPC wrappers for Container contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package container contains RPC wrappers for Container contract.
package container
import (

View file

@ -1,6 +1,6 @@
// Package frostfs contains RPC wrappers for FrostFS contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package frostfs contains RPC wrappers for FrostFS contract.
package frostfs
import (

View file

@ -1,6 +1,6 @@
// Package identity contains RPC wrappers for Identity contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package identity contains RPC wrappers for Identity contract.
package identity
import (

View file

@ -1,6 +1,6 @@
// Package netmap contains RPC wrappers for Netmap contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package netmap contains RPC wrappers for Netmap contract.
package netmap
import (

View file

@ -1,6 +1,6 @@
// Package nameservice contains RPC wrappers for NameService contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package nameservice contains RPC wrappers for NameService contract.
package nameservice
import (

View file

@ -1,6 +1,6 @@
// Package ape contains RPC wrappers for APE contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package ape contains RPC wrappers for APE contract.
package ape
import (
@ -72,6 +72,11 @@ func (c *ContractReader) ListChainsByPrefix(entity *big.Int, entityName string,
return unwrap.Array(c.invoker.Call(c.hash, "listChainsByPrefix", entity, entityName, prefix))
}
// Version invokes `version` method of contract.
func (c *ContractReader) Version() (*big.Int, error) {
return unwrap.BigInt(c.invoker.Call(c.hash, "version"))
}
// AddChain creates a transaction invoking `addChain` 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.

View file

@ -1,6 +1,6 @@
// Package multisignatureprocessing contains RPC wrappers for Multi Signature Processing contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package multisignatureprocessing contains RPC wrappers for Multi Signature Processing contract.
package multisignatureprocessing
import (

View file

@ -1,6 +1,6 @@
// Package notaryproxy contains RPC wrappers for Notary Proxy contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package notaryproxy contains RPC wrappers for Notary Proxy contract.
package notaryproxy
import (