2021-12-02 14:44:53 +00:00
|
|
|
package verify
|
2020-08-24 11:00:05 +00:00
|
|
|
|
|
|
|
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.
|
2021-05-11 13:32:09 +00:00
|
|
|
// It returns true iff it is signed by Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn (id-0 private key from testchain).
|
2020-08-24 11:00:05 +00:00
|
|
|
func Verify() bool {
|
|
|
|
tx := runtime.GetScriptContainer()
|
2021-05-11 13:32:09 +00:00
|
|
|
addr := util.FromAddress("Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn")
|
2021-03-09 10:18:34 +00:00
|
|
|
return util.Equals(string(tx.Sender), string(addr))
|
2020-08-24 11:00:05 +00:00
|
|
|
}
|