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

feat: save failed submsg result in reply for timelocked contract #ntrn-80 #78

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4a733f4
feat: save execution failure for proposal in timelock contract
NeverHappened Aug 28, 2023
e3f7b16
add comment for expected format of returned error
NeverHappened Sep 1, 2023
ef65e8b
feat: save lists of failures instead of one and block height with it
NeverHappened Sep 5, 2023
0c7b849
fix lint
NeverHappened Sep 5, 2023
56765ce
review fixes
NeverHappened Sep 7, 2023
e1e145d
fix schema
NeverHappened Sep 7, 2023
5ec3ca1
add test for new code
NeverHappened Sep 7, 2023
84e1123
add failed proposal errors query to single and multiple proposals
NeverHappened Sep 13, 2023
0f08386
feat: add close_proposal_on_execution_failure logic to timelocked con…
NeverHappened Sep 13, 2023
12b92f0
add query for timelock proposal module to subdao core and use it
NeverHappened Sep 14, 2023
f9fec92
check with close_proposal_on_execution_failure = false
NeverHappened Sep 14, 2023
6ca23e0
cargo fmt and cargo schema
NeverHappened Sep 14, 2023
5f767f7
fix build
NeverHappened Sep 14, 2023
f276009
add tests for reply errors in single/multiple
NeverHappened Sep 15, 2023
f316f07
fix lint on old rust version
NeverHappened Sep 15, 2023
00089ad
Merge branch 'sdk-47' into feat/save-failed-result
NeverHappened Sep 20, 2023
03a52d1
Use just string for errors since there is only one value possible. Fi…
NeverHappened Sep 29, 2023
059fdfc
fix
NeverHappened Oct 6, 2023
71b6b2c
review fixes
NeverHappened Oct 7, 2023
8b2dda5
Get back check for subdao search
NeverHappened Oct 9, 2023
27c663f
add comment explaining subdao addr check
NeverHappened Oct 10, 2023
76304ab
review fixes - rename failed_execution_proposal_errors -> failed_prop…
NeverHappened Oct 10, 2023
6cd5624
review fixes - rename arg
NeverHappened Oct 10, 2023
381a000
timelock_contract -> Addr
NeverHappened Oct 10, 2023
61ea818
Merge branch 'sdk-47' into feat/save-failed-result
NeverHappened Oct 10, 2023
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
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/dao/cwd-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cw20 = "1.1.0"
cw721 = "0.18.0"
cwd-interface = {path = "../../../packages/cwd-interface"}
cwd-macros = {path = "../../../packages/cwd-macros"}
neutron-sdk = {package = "neutron-sdk", git="https://github.com/neutron-org/neutron-sdk", branch="feat/sdk47"}
neutron-sdk = {package = "neutron-sdk", git="https://github.com/neutron-org/neutron-sdk", branch="sdk/47"}
schemars = "0.8.8"
serde = {version = "1.0.175", default-features = false, features = ["derive"]}
thiserror = {version = "1.0"}
63 changes: 60 additions & 3 deletions contracts/dao/cwd-core/schema/cwd-core.json
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,8 @@
"type": "object",
"required": [
"connection_id",
"interchain_account_id"
"interchain_account_id",
"register_fee"
],
"properties": {
"connection_id": {
Expand All @@ -1102,6 +1103,13 @@
"interchain_account_id": {
"description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.",
"type": "string"
},
"register_fee": {
"description": "*register_fee** is a fees required to be payed to register interchain account",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
Expand Down Expand Up @@ -1466,6 +1474,31 @@
},
"additionalProperties": false
},
{
"description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.",
"type": "object",
"required": [
"set_before_send_hook"
],
"properties": {
"set_before_send_hook": {
"type": "object",
"required": [
"contract_addr",
"denom"
],
"properties": {
"contract_addr": {
"type": "string"
},
"denom": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]",
"type": "object",
Expand Down Expand Up @@ -1523,6 +1556,29 @@
}
},
"additionalProperties": false
},
{
"description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]",
"type": "object",
"required": [
"resubmit_failure"
],
"properties": {
"resubmit_failure": {
"type": "object",
"required": [
"failure_id"
],
"properties": {
"failure_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -1600,14 +1656,15 @@
}
},
"ProposalExecuteMessage": {
"description": "ProposalExecuteMessage defines the struct for sdk47 compatible update params admin proposal.",
"description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.",
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"description": "*message** is a json representing a sdk message passed to admin module to execute."
"description": "*message** is a json representing an sdk message passed to admin module to execute.",
"type": "string"
}
}
},
Expand Down
63 changes: 60 additions & 3 deletions contracts/dao/cwd-core/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,8 @@
"type": "object",
"required": [
"connection_id",
"interchain_account_id"
"interchain_account_id",
"register_fee"
],
"properties": {
"connection_id": {
Expand All @@ -942,6 +943,13 @@
"interchain_account_id": {
"description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.",
"type": "string"
},
"register_fee": {
"description": "*register_fee** is a fees required to be payed to register interchain account",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
Expand Down Expand Up @@ -1306,6 +1314,31 @@
},
"additionalProperties": false
},
{
"description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.",
"type": "object",
"required": [
"set_before_send_hook"
],
"properties": {
"set_before_send_hook": {
"type": "object",
"required": [
"contract_addr",
"denom"
],
"properties": {
"contract_addr": {
"type": "string"
},
"denom": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]",
"type": "object",
Expand Down Expand Up @@ -1363,6 +1396,29 @@
}
},
"additionalProperties": false
},
{
"description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]",
"type": "object",
"required": [
"resubmit_failure"
],
"properties": {
"resubmit_failure": {
"type": "object",
"required": [
"failure_id"
],
"properties": {
"failure_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -1440,14 +1496,15 @@
}
},
"ProposalExecuteMessage": {
"description": "ProposalExecuteMessage defines the struct for sdk47 compatible update params admin proposal.",
"description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.",
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"description": "*message** is a json representing a sdk message passed to admin module to execute."
"description": "*message** is a json representing an sdk message passed to admin module to execute.",
"type": "string"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cw2 = "1.1.0"
serde = { version = "1.0.175", default-features = false, features = ["derive"] }
cwd-pre-propose-base = { version = "*", path = "../../../../packages/cwd-pre-propose-base" }
cwd-voting = { path = "../../../../packages/cwd-voting" }
neutron-sdk = {package = "neutron-sdk", git="https://github.com/neutron-org/neutron-sdk", branch="feat/sdk47"}
neutron-sdk = {package = "neutron-sdk", git="https://github.com/neutron-org/neutron-sdk", branch="sdk/47"}
schemars = "0.8.8"
cosmwasm-schema = "1.3.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,8 @@
"type": "object",
"required": [
"connection_id",
"interchain_account_id"
"interchain_account_id",
"register_fee"
],
"properties": {
"connection_id": {
Expand All @@ -1006,6 +1007,13 @@
"interchain_account_id": {
"description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.",
"type": "string"
},
"register_fee": {
"description": "*register_fee** is a fees required to be payed to register interchain account",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
Expand Down Expand Up @@ -1370,6 +1378,31 @@
},
"additionalProperties": false
},
{
"description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.",
"type": "object",
"required": [
"set_before_send_hook"
],
"properties": {
"set_before_send_hook": {
"type": "object",
"required": [
"contract_addr",
"denom"
],
"properties": {
"contract_addr": {
"type": "string"
},
"denom": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]",
"type": "object",
Expand Down Expand Up @@ -1427,6 +1460,29 @@
}
},
"additionalProperties": false
},
{
"description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]",
"type": "object",
"required": [
"resubmit_failure"
],
"properties": {
"resubmit_failure": {
"type": "object",
"required": [
"failure_id"
],
"properties": {
"failure_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -1504,14 +1560,15 @@
}
},
"ProposalExecuteMessage": {
"description": "ProposalExecuteMessage defines the struct for sdk47 compatible update params admin proposal.",
"description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.",
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"description": "*message** is a json representing a sdk message passed to admin module to execute."
"description": "*message** is a json representing an sdk message passed to admin module to execute.",
"type": "string"
}
}
},
Expand Down
Loading