Merge pull request #2332 from nspcc-dev/native/fix-notary

core: adjust native Notary `withdraw` call flags
This commit is contained in:
Roman Khimov 2022-01-19 18:25:23 +03:00 committed by GitHub
commit c9ccc9b575
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ func newNotary() *Notary {
desc = newDescriptor("withdraw", smartcontract.BoolType,
manifest.NewParameter("from", smartcontract.Hash160Type),
manifest.NewParameter("to", smartcontract.Hash160Type))
md = newMethodAndPrice(n.withdraw, 1<<15, callflag.States)
md = newMethodAndPrice(n.withdraw, 1<<15, callflag.All)
n.AddMethod(md, desc)
desc = newDescriptor("balanceOf", smartcontract.IntegerType,

View file

@ -22,7 +22,7 @@ func LockDepositUntil(addr interop.Hash160, till int) bool {
// Withdraw represents `withdraw` method of Notary native contract.
func Withdraw(from, to interop.Hash160) bool {
return neogointernal.CallWithToken(Hash, "withdraw", int(contract.States),
return neogointernal.CallWithToken(Hash, "withdraw", int(contract.All),
from, to).(bool)
}