compiler: update x/tools package
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
e7a0ecb349
commit
9871dc8f5a
22 changed files with 235 additions and 140 deletions
14
pkg/rpc/server/testdata/verify/verification_contract.go
vendored
Normal file
14
pkg/rpc/server/testdata/verify/verification_contract.go
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
package verify
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/util"
|
||||
)
|
||||
|
||||
// Verify is a verification contract method.
|
||||
// It returns true iff it is signed by Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn (id-0 private key from testchain).
|
||||
func Verify() bool {
|
||||
tx := runtime.GetScriptContainer()
|
||||
addr := util.FromAddress("Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn")
|
||||
return util.Equals(string(tx.Sender), string(addr))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue