Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: batch grants update #291

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
88474d3
squashed v1.0.0: https://github.com/burnt-labs/xion/compare/v1.0.0
2xburnt Dec 21, 2024
ef053fb
squashed v2.0.0: https://github.com/burnt-labs/xion/compare/v2.0.0
2xburnt Dec 21, 2024
c415a6d
squashed v3.0.0: https://github.com/burnt-labs/xion/compare/v3.0.0
2xburnt Dec 21, 2024
de91248
squashed v3.1.1: https://github.com/burnt-labs/xion/compare/v3.1.1
2xburnt Dec 21, 2024
3971007
squashed v4.0.0: https://github.com/burnt-labs/xion/compare/v4.0.0
2xburnt Dec 21, 2024
d2ac3d0
squashed v5.0.0: https://github.com/burnt-labs/xion/compare/v5.0.0
2xburnt Dec 21, 2024
c5f312e
squashed v6.0.0: https://github.com/burnt-labs/xion/compare/v6.0.0
2xburnt Dec 21, 2024
94c4d9e
squashed v7.0.0: https://github.com/burnt-labs/xion/compare/v7.0.0
2xburnt Dec 21, 2024
1917092
squashed v8.0.0: https://github.com/burnt-labs/xion/compare/v8.0.0
2xburnt Dec 21, 2024
091091b
squashed v8.0.1: https://github.com/burnt-labs/xion/compare/v8.0.1
2xburnt Dec 21, 2024
0bf8312
squashed v9.0.0: https://github.com/burnt-labs/xion/compare/v9.0.0
2xburnt Dec 21, 2024
0c36c1d
squashed v9.0.1: https://github.com/burnt-labs/xion/compare/v9.0.1
2xburnt Dec 21, 2024
d2006e8
squashed v10.0.0: https://github.com/burnt-labs/xion/compare/v10.0.0
2xburnt Dec 21, 2024
974257b
squashed v11.0.0: https://github.com/burnt-labs/xion/compare/v11.0.0
2xburnt Dec 21, 2024
0b0fb02
squashed v11.0.1: https://github.com/burnt-labs/xion/compare/v11.0.1
2xburnt Dec 21, 2024
ab8867e
squashed v12.0.0: https://github.com/burnt-labs/xion/compare/v12.0.0
2xburnt Dec 21, 2024
5466ced
squashed v12.0.1: https://github.com/burnt-labs/xion/compare/v12.0.1
2xburnt Dec 21, 2024
e9dc078
squashed v13.0.0: https://github.com/burnt-labs/xion/compare/v13.0.0
2xburnt Dec 21, 2024
3512686
squashed v13.0.1: https://github.com/burnt-labs/xion/compare/v13.0.1
2xburnt Dec 21, 2024
d295a52
squashed v14.0.0: https://github.com/burnt-labs/xion/compare/v14.0.0
2xburnt Dec 21, 2024
c694360
squashed v14.1.0: https://github.com/burnt-labs/xion/compare/v14.1.0
2xburnt Dec 21, 2024
9554ae0
squashed v14.1.1: https://github.com/burnt-labs/xion/compare/v14.1.1
2xburnt Dec 21, 2024
e670844
WIP: batch grants update
Peartes Jan 1, 2025
8727cb5
chore: CLI command to update grants and fee config
Peartes Jan 2, 2025
df1975c
chore: integration test for CLI cmd to update treasury configs
Peartes Jan 2, 2025
4c4faec
fix: use multiple execute msg to update fee configs
Peartes Jan 2, 2025
dfc19a6
WIP: sign wasm update config with AA
Peartes Jan 3, 2025
f1031cf
feat: wasm treasury update config with AA signer
Peartes Jan 4, 2025
246627c
rebase on release/v14
Peartes Jan 6, 2025
863f92a
WIP: allow local and remote config files
Peartes Jan 8, 2025
c585bed
Merge branch 'feat/json-grants' of github.com:burnt-labs/xion into fe…
Peartes Jan 8, 2025
5bbe9ac
chore: remove unneeded files
Peartes Jan 8, 2025
4b3d520
chore: integration test for using local or url grant config file
Peartes Jan 8, 2025
a73c3a7
chore: set configUrl arg in make command
Peartes Jan 8, 2025
46f34b8
WIP: serialize grants using interface registry
Peartes Jan 13, 2025
6ce7bb8
chore: fix update config json
Peartes Jan 14, 2025
c1f0049
chore: fix integration test
Peartes Jan 15, 2025
6f3e0bf
WIP: fixing failing test
Peartes Jan 16, 2025
0ec84dc
fix: failing unit test
Peartes Jan 16, 2025
8c9cc62
lint: failing lint
Peartes Jan 16, 2025
34f7b66
debug: logs
Peartes Jan 16, 2025
65d594f
fix: use bin raw instead of exec Tx
Peartes Jan 16, 2025
2151c19
chore: run test in linux arm64
Peartes Jan 22, 2025
a5c0a96
debug: logs
Peartes Jan 22, 2025
cc79e85
fix: failing integration test
Peartes Jan 22, 2025
edbc10a
Merge branch 'main' into feat/json-grants
Peartes Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ jobs:
- "TreasuryMulti"
- "SingleAbstractAccountMigration"
- "Simulate"
- "UpdateTreasuryConfigsWithLocalAndURL"
- "UpdateTreasuryConfigsWithAALocalAndURL"

steps:
- name: checkout
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ test-integration-xion-token-factory: compile_integration_tests
test-integration-xion-treasury-grants: compile_integration_tests
@XION_TEST_IMAGE=$(XION_TEST_IMAGE) ./integration_tests/integration_tests.test -test.failfast -test.v -test.run TestTreasuryContract

test-integration-xion-update-treasury-configs: compile_integration_tests
@XION_TEST_IMAGE=$(XION_TEST_IMAGE) ./integration_tests/integration_tests.test -test.failfast -test.v -test.run TestUpdateTreasuryConfigsWithLocalAndURL --configUrl="$(configUrl)"

test-integration-xion-update-treasury-configs-aa: compile_integration_tests
@XION_TEST_IMAGE=$(XION_TEST_IMAGE) ./integration_tests/integration_tests.test -test.failfast -test.v -test.run TestUpdateTreasuryConfigsWithAALocalAndURL --configUrl="$(configUrl)"

test-integration-xion-treasury-multi: compile_integration_tests
@XION_TEST_IMAGE=$(XION_TEST_IMAGE) ./integration_tests/integration_tests.test -test.failfast -test.v -test.run TestTreasuryMulti

Expand Down
Binary file modified integration_tests/testdata/contracts/treasury-aarch64.wasm
Binary file not shown.
34 changes: 34 additions & 0 deletions integration_tests/testdata/unsigned_msgs/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"grant_config": [
{
"msg_type_url": "/cosmos.bank.v1.MsgSend",
"grant_config": {
"description": "Bank grant",
"authorization": {
"type_url": "/cosmos.authz.v1.GenericAuthorization",
"value": "CgRQYXk="
},
"optional": true
}
},
{
"msg_type_url": "/cosmos.staking.v1.MsgDelegate",
"grant_config": {
"description": "Staking grant",
"authorization": {
"type_url": "/cosmos.authz.v1.GenericAuthorization",
"value": "CgREZWxlZ2F0ZQ=="
},
"optional": false
}
}
],
"fee_config": {
"description": "Fee allowance for user1",
"allowance": {
"type_url": "/cosmos.feegrant.v1.BasicAllowance",
"value": "CgQICAI="
},
"expiration": 1715151235
}
}
89 changes: 89 additions & 0 deletions integration_tests/testdata/unsigned_msgs/plain_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"grant_config": [
{
"msg_type_url": "/cosmos.bank.v1beta1.MsgSend",
"grant_config": {
"description": "Bank grant",
"authorization": {
"@type": "/cosmos.authz.v1beta1.GenericAuthorization",
"msg": "/cosmos.bank.v1beta1.MsgSend"
},
"optional": true
}
},
{
"msg_type_url": "/cosmos.staking.v1beta1.MsgDelegate",
"grant_config": {
"description": "Staking grant",
"authorization": {
"@type": "/cosmos.authz.v1beta1.GenericAuthorization",
"msg": "/cosmos.staking.v1beta1.MsgDelegate"
},
"optional": false
}
},
{
"msg_type_url": "/cosmos.gov.v1beta1.MsgVote",
"grant_config": {
"description": "Governance vote grant",
"authorization": {
"@type": "/cosmwasm.wasm.v1.ContractExecutionAuthorization",
"grants": [
{
"contract": "cosmos1contractaddress",
"limit": {
"@type": "/cosmwasm.wasm.v1.MaxCallsLimit",
"remaining": "5"
},
"filter": {
"@type": "/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",
"keys": ["key1", "key2"]
}
},
{
"contract": "cosmos1anothercontractaddress",
"limit": {
"@type": "/cosmwasm.wasm.v1.CombinedLimit",
"calls_remaining": "5",
"amounts": [
{
"denom": "uxion",
"amount": "1000"
}
]
},
"filter": {
"@type": "/cosmwasm.wasm.v1.AllowAllMessagesFilter"
}
}
]
},
"optional": true
}
}
],
"fee_config": {
"description": "Fee allowance for user1",
"allowance": {
"@type": "/cosmos.feegrant.v1beta1.AllowedMsgAllowance",
"allowance": {
"@type": "/cosmos.feegrant.v1beta1.AllowedMsgAllowance",
"allowance": {
"@type": "/cosmos.feegrant.v1beta1.BasicAllowance",
"spend_limit": [
{
"denom": "atom",
"amount": "1000"
}
],
"expiration": "2025-01-01T00:00:00Z"
},
"allowed_messages": [
"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"
]
},
"allowed_messages": ["/cosmos.staking.v1beta1.MsgDelegate"]
},
"expiration": 1715151235
}
}
Loading
Loading