2021-12-02 17:44:53 +03:00
|
|
|
package verify
|
2020-08-24 14:00:05 +03:00
|
|
|
|
|
|
|
import (
|
2023-03-18 10:44:12 +03:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/lib/address"
|
2020-08-24 14:00:05 +03:00
|
|
|
"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 16:32:09 +03:00
|
|
|
// It returns true iff it is signed by Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn (id-0 private key from testchain).
|
2020-08-24 14:00:05 +03:00
|
|
|
func Verify() bool {
|
|
|
|
tx := runtime.GetScriptContainer()
|
2023-03-18 10:44:12 +03:00
|
|
|
addr := address.ToHash160("Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn")
|
2021-03-09 13:18:34 +03:00
|
|
|
return util.Equals(string(tx.Sender), string(addr))
|
2020-08-24 14:00:05 +03:00
|
|
|
}
|