Skip to content

Commit

Permalink
Revert "feat: replace all admins with mars-owner" (#660)
Browse files Browse the repository at this point in the history
Reverts #649
  • Loading branch information
ajansari95 authored Jul 17, 2024
1 parent 4e1b160 commit a377b9d
Show file tree
Hide file tree
Showing 17 changed files with 213 additions and 296 deletions.
1 change: 0 additions & 1 deletion smart-contracts/Cargo.lock

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

3 changes: 1 addition & 2 deletions smart-contracts/contracts/range-middleware/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ serde = { workspace = true }
thiserror = { workspace = true }
dex-router-osmosis = { workspace = true }
cl-vault = {path = "../cl-vault", features = ["library"]}
osmosis-std = { workspace = true }
mars-owner = { workspace = true }
osmosis-std = "0.25.0"

[dev-dependencies]
cw-multi-test = { workspace = true }
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"title": "InstantiateMsg",
"type": "object",
"required": [
"range_executor_owner",
"range_submitter_owner"
"range_executor_admin",
"range_submitter_admin"
],
"properties": {
"range_executor_owner": {
"range_executor_admin": {
"type": "string"
},
"range_submitter_owner": {
"range_submitter_admin": {
"type": "string"
}
},
Expand Down Expand Up @@ -49,46 +49,51 @@
}
},
"additionalProperties": false
},
{
"description": "contract owner updtae",
"type": "object",
"required": [
"update_owner"
],
"properties": {
"update_owner": {
"$ref": "#/definitions/OwnerUpdate"
}
},
"additionalProperties": false
}
],
"definitions": {
"AdminExecuteMsg": {
"oneOf": [
{
"description": "Update the range submitter owner.",
"description": "Update the range submitter admin.",
"type": "object",
"required": [
"update_range_submitter_owner"
"update_range_submitter_admin"
],
"properties": {
"update_range_submitter_owner": {
"$ref": "#/definitions/OwnerUpdate"
"update_range_submitter_admin": {
"type": "object",
"required": [
"new_admin"
],
"properties": {
"new_admin": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Update the range executor owner.",
"description": "Update the range executor admin.",
"type": "object",
"required": [
"update_range_executor_owner"
"update_range_executor_admin"
],
"properties": {
"update_range_executor_owner": {
"$ref": "#/definitions/OwnerUpdate"
"update_range_executor_admin": {
"type": "object",
"required": [
"new_admin"
],
"properties": {
"new_admin": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
Expand Down Expand Up @@ -119,53 +124,6 @@
},
"additionalProperties": false
},
"OwnerUpdate": {
"oneOf": [
{
"description": "Proposes a new owner to take role. Only current owner can execute.",
"type": "object",
"required": [
"propose_new_owner"
],
"properties": {
"propose_new_owner": {
"type": "object",
"required": [
"proposed"
],
"properties": {
"proposed": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Clears the currently proposed owner. Only current owner can execute.",
"type": "string",
"enum": [
"clear_proposed"
]
},
{
"description": "Promotes the proposed owner to be the current one. Only the proposed owner can execute.",
"type": "string",
"enum": [
"accept_proposed"
]
},
{
"description": "Throws away the keys to the Owner role forever. Once done, no owner can ever be set later.",
"type": "string",
"enum": [
"abolish_owner_role"
]
}
]
},
"RangeExecuteMsg": {
"oneOf": [
{
Expand Down Expand Up @@ -301,10 +259,10 @@
{
"type": "object",
"required": [
"get_range_submitter_owner"
"get_range_submitter_admin"
],
"properties": {
"get_range_submitter_owner": {
"get_range_submitter_admin": {
"type": "object",
"additionalProperties": false
}
Expand All @@ -314,10 +272,10 @@
{
"type": "object",
"required": [
"get_execution_owner"
"get_execution_admin"
],
"properties": {
"get_execution_owner": {
"get_execution_admin": {
"type": "object",
"additionalProperties": false
}
Expand Down
94 changes: 26 additions & 68 deletions smart-contracts/contracts/range-middleware/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,51 @@
}
},
"additionalProperties": false
},
{
"description": "contract owner updtae",
"type": "object",
"required": [
"update_owner"
],
"properties": {
"update_owner": {
"$ref": "#/definitions/OwnerUpdate"
}
},
"additionalProperties": false
}
],
"definitions": {
"AdminExecuteMsg": {
"oneOf": [
{
"description": "Update the range submitter owner.",
"description": "Update the range submitter admin.",
"type": "object",
"required": [
"update_range_submitter_owner"
"update_range_submitter_admin"
],
"properties": {
"update_range_submitter_owner": {
"$ref": "#/definitions/OwnerUpdate"
"update_range_submitter_admin": {
"type": "object",
"required": [
"new_admin"
],
"properties": {
"new_admin": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Update the range executor owner.",
"description": "Update the range executor admin.",
"type": "object",
"required": [
"update_range_executor_owner"
"update_range_executor_admin"
],
"properties": {
"update_range_executor_owner": {
"$ref": "#/definitions/OwnerUpdate"
"update_range_executor_admin": {
"type": "object",
"required": [
"new_admin"
],
"properties": {
"new_admin": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
Expand Down Expand Up @@ -97,53 +102,6 @@
},
"additionalProperties": false
},
"OwnerUpdate": {
"oneOf": [
{
"description": "Proposes a new owner to take role. Only current owner can execute.",
"type": "object",
"required": [
"propose_new_owner"
],
"properties": {
"propose_new_owner": {
"type": "object",
"required": [
"proposed"
],
"properties": {
"proposed": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Clears the currently proposed owner. Only current owner can execute.",
"type": "string",
"enum": [
"clear_proposed"
]
},
{
"description": "Promotes the proposed owner to be the current one. Only the proposed owner can execute.",
"type": "string",
"enum": [
"accept_proposed"
]
},
{
"description": "Throws away the keys to the Owner role forever. Once done, no owner can ever be set later.",
"type": "string",
"enum": [
"abolish_owner_role"
]
}
]
},
"RangeExecuteMsg": {
"oneOf": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"title": "InstantiateMsg",
"type": "object",
"required": [
"range_executor_owner",
"range_submitter_owner"
"range_executor_admin",
"range_submitter_admin"
],
"properties": {
"range_executor_owner": {
"range_executor_admin": {
"type": "string"
},
"range_submitter_owner": {
"range_submitter_admin": {
"type": "string"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
{
"type": "object",
"required": [
"get_range_submitter_owner"
"get_range_submitter_admin"
],
"properties": {
"get_range_submitter_owner": {
"get_range_submitter_admin": {
"type": "object",
"additionalProperties": false
}
Expand All @@ -48,10 +48,10 @@
{
"type": "object",
"required": [
"get_execution_owner"
"get_execution_admin"
],
"properties": {
"get_execution_owner": {
"get_execution_admin": {
"type": "object",
"additionalProperties": false
}
Expand Down
Loading

0 comments on commit a377b9d

Please sign in to comment.