Add Version() method to the policy contract #68
12 changed files with 31 additions and 20 deletions
|
@ -4,3 +4,4 @@ safemethods:
|
|||
- "listChains"
|
||||
- "getChain"
|
||||
- "listChainsByPrefix"
|
||||
- "version"
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
Loading…
Add table
Reference in a new issue