Add Version() method to the policy contract #68
12 changed files with 31 additions and 20 deletions
|
@ -4,3 +4,4 @@ safemethods:
|
||||||
- "listChains"
|
- "listChains"
|
||||||
- "getChain"
|
- "getChain"
|
||||||
- "listChainsByPrefix"
|
- "listChainsByPrefix"
|
||||||
|
- "version"
|
||||||
|
|
|
@ -58,6 +58,11 @@ func checkAuthorization(ctx storage.Context) {
|
||||||
panic(ErrNotAuthorized)
|
panic(ErrNotAuthorized)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Version returns the version of the contract.
|
||||||
|
func Version() int {
|
||||||
|
return common.Version
|
||||||
|
}
|
||||||
|
|
||||||
func SetAdmin(addr interop.Hash160) {
|
func SetAdmin(addr interop.Hash160) {
|
||||||
common.CheckAlphabetWitness()
|
common.CheckAlphabetWitness()
|
||||||
|
|
||||||
|
|
|
@ -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.
|
// 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
|
package alphabet
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package balance
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package container
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package frostfs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package identity
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package netmap
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package nameservice
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package ape
|
||||||
|
|
||||||
import (
|
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))
|
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.
|
// AddChain creates a transaction invoking `addChain` method of the contract.
|
||||||
// This transaction is signed and immediately sent to the network.
|
// This transaction is signed and immediately sent to the network.
|
||||||
// The values returned are its hash, ValidUntilBlock value and error if any.
|
// The values returned are its hash, ValidUntilBlock value and error if any.
|
||||||
|
|
|
@ -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.
|
// 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
|
package multisignatureprocessing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package notaryproxy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Add table
Reference in a new issue