Closed blushingchives closed 1 year ago
When granting ContractExecutionAuthorization to 2 different contract, the 2nd grant replaces the 1st one.
1st grant message:
authorization: { typeUrl: '/cosmwasm.wasm.v1.ContractExecutionAuthorization', value: ContractExecutionAuthorization.encode(ContractExecutionAuthorization.fromPartial({ grants: [{ contract: "contract1", filter: { typeUrl: '/cosmwasm.wasm.v1.AcceptedMessageKeysFilter', value: AcceptedMessageKeysFilter.encode(AcceptedMessageKeysFilter.fromPartial({ keys: ["action"] })).finish() }, limit: { typeUrl: '/cosmwasm.wasm.v1.MaxFundsLimit', value: MaxFundsLimit.encode(MaxFundsLimit.fromPartial({ amounts: [{ denom: "NOTOKEN", amount: "1" }] })).finish() }, }] }),).finish(), }
2nd grant message:
authorization: { typeUrl: '/cosmwasm.wasm.v1.ContractExecutionAuthorization', value: ContractExecutionAuthorization.encode(ContractExecutionAuthorization.fromPartial({ grants: [{ contract: "contract2", filter: { typeUrl: '/cosmwasm.wasm.v1.AcceptedMessageKeysFilter', value: AcceptedMessageKeysFilter.encode(AcceptedMessageKeysFilter.fromPartial({ keys: ["action"] })).finish() }, limit: { typeUrl: '/cosmwasm.wasm.v1.MaxFundsLimit', value: MaxFundsLimit.encode(MaxFundsLimit.fromPartial({ amounts: [{ denom: "NOTOKEN", amount: "1" }] })).finish() }, }] }),).finish(), }
Do you mind opening a ticket in the wasm repo where this is implemented? Here we only do code generation for the types and don't control this sort of things.
When granting ContractExecutionAuthorization to 2 different contract, the 2nd grant replaces the 1st one.
1st grant message:
2nd grant message: