From e18f0f517856668e35bb8753fa89214803d77f7c Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 20 Feb 2024 18:59:35 +0300 Subject: [PATCH] [#999] morph: Use Global scope for proxy contract Proxy contract can now be used as an owner of NNS domains, thus we need it not only to pay for the transaction but also to check domain ownership. CalledByEntry is not enough, because we may register NNS domains owned by proxy indirectly from the container contract. Signed-off-by: Evgenii Stratonikov --- pkg/morph/client/notary.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/morph/client/notary.go b/pkg/morph/client/notary.go index 5b817a80..1665fec1 100644 --- a/pkg/morph/client/notary.go +++ b/pkg/morph/client/notary.go @@ -569,7 +569,11 @@ func (c *Client) notaryCosigners(invokedByAlpha bool, ir []*keys.PublicKey, comm s[0] = actor.SignerAccount{ Signer: transaction.Signer{ Account: c.notary.proxy, - Scopes: transaction.None, + // Do not change this: + // We must be able to call NNS contract indirectly from the Container contract. + // Thus, CalledByEntry is not sufficient. + // In future we may restrict this to all the usecases we have. + Scopes: transaction.Global, }, Account: notary.FakeContractAccount(c.notary.proxy), }