Custom AuthorizationPolicy with code & contract info#1999
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1999 +/- ##
==========================================
+ Coverage 54.40% 54.46% +0.06%
==========================================
Files 65 65
Lines 9976 9985 +9
==========================================
+ Hits 5427 5438 +11
+ Misses 3993 3992 -1
+ Partials 556 555 -1
|
|
Thanks for your PR. to grant the permission to an address to store a code with specific checksum and specific instantiate permission. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1999 +/- ##
==========================================
+ Coverage 54.40% 54.46% +0.06%
==========================================
Files 65 65
Lines 9976 9985 +9
==========================================
+ Hits 5427 5438 +11
+ Misses 3993 3992 -1
+ Partials 556 555 -1
🚀 New features to boost your workflow:
|
CosmWasm integration with THORChain requires a different model for permissioning than standard
AccessConfigviax/gov:createfunction to discriminate permissions based on the actual code being uploaded, instantiated (or contracts being modified).AuthorizationPolicy interfaceloaded inmsg_server.goto have theCodeInfopassed duringCanCreateCodeandCanInstantiateContractchecks.ContractInfowhere appropriate, for a more uniform and flexible interfaceselectAuthorizationPolicyis currently fixed, this PR also adds acustomAuthPolicy func(ctx context.Context, actor string) (types.AuthorizationPolicy, bool)value to theKeeperstruct, which can be set inNewKeeperwith anOptionAuthorizationPolicyimplementations, accessing state outside x/wasm etc