Skip to content

Commit

Permalink
Remove authz messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lubkoll committed Aug 26, 2024
1 parent 2806902 commit 1acb8a9
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 444 deletions.
73 changes: 0 additions & 73 deletions smart-contracts/osmosis/contracts/cl-vault/schema/cl-vault.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,66 +377,6 @@
}
]
},
"AuthzExtension": {
"description": "Extension messages for Authz. This interface basically reexports certain vault functionality but sets recipient forcibly to None",
"oneOf": [
{
"type": "object",
"required": [
"exact_deposit"
],
"properties": {
"exact_deposit": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"any_deposit"
],
"properties": {
"any_deposit": {
"type": "object",
"required": [
"max_slippage"
],
"properties": {
"max_slippage": {
"$ref": "#/definitions/Decimal"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"redeem"
],
"properties": {
"redeem": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"Decimal": {
"description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)",
"type": "string"
Expand All @@ -457,19 +397,6 @@
},
"additionalProperties": false
},
{
"description": "An interface of certain vault interaction with forced values for authz",
"type": "object",
"required": [
"authz"
],
"properties": {
"authz": {
"$ref": "#/definitions/AuthzExtension"
}
},
"additionalProperties": false
},
{
"description": "Rebalance our liquidity range based on an off-chain message given to us by RANGE_ADMIN",
"type": "object",
Expand Down
73 changes: 0 additions & 73 deletions smart-contracts/osmosis/contracts/cl-vault/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,66 +268,6 @@
}
]
},
"AuthzExtension": {
"description": "Extension messages for Authz. This interface basically reexports certain vault functionality but sets recipient forcibly to None",
"oneOf": [
{
"type": "object",
"required": [
"exact_deposit"
],
"properties": {
"exact_deposit": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"any_deposit"
],
"properties": {
"any_deposit": {
"type": "object",
"required": [
"max_slippage"
],
"properties": {
"max_slippage": {
"$ref": "#/definitions/Decimal"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"redeem"
],
"properties": {
"redeem": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"Decimal": {
"description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)",
"type": "string"
Expand All @@ -348,19 +288,6 @@
},
"additionalProperties": false
},
{
"description": "An interface of certain vault interaction with forced values for authz",
"type": "object",
"required": [
"authz"
],
"properties": {
"authz": {
"$ref": "#/definitions/AuthzExtension"
}
},
"additionalProperties": false
},
{
"description": "Rebalance our liquidity range based on an off-chain message given to us by RANGE_ADMIN",
"type": "object",
Expand Down
12 changes: 0 additions & 12 deletions smart-contracts/osmosis/contracts/cl-vault/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ pub fn execute(
crate::msg::ExtensionExecuteMsg::Admin(admin_msg) => {
execute_admin(deps, info, admin_msg)
}
crate::msg::ExtensionExecuteMsg::Authz(msg) => match msg {
crate::msg::AuthzExtension::ExactDeposit {} => {
execute_exact_deposit(deps, env, info, None)
}
crate::msg::AuthzExtension::AnyDeposit { max_slippage } => {
execute_any_deposit(deps, env, info, None, max_slippage)
}
crate::msg::AuthzExtension::Redeem { amount } => prepend_claim_msg(
&env,
execute_withdraw(deps, &env, info, None, amount.into())?,
),
},
crate::msg::ExtensionExecuteMsg::Merge(msg) => {
execute_merge_position(deps, env, info, msg)
}
Expand Down
13 changes: 1 addition & 12 deletions smart-contracts/osmosis/contracts/cl-vault/src/msg.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cosmwasm_schema::{cw_serde, QueryResponses};
use cosmwasm_std::{Addr, Decimal, Uint128};
use cosmwasm_std::{Addr, Decimal};
use cw_vault_multi_standard::{VaultStandardExecuteMsg, VaultStandardQueryMsg};
use osmosis_std::types::osmosis::poolmanager::v1beta1::SwapAmountInRoute;

Expand All @@ -15,8 +15,6 @@ use crate::state::{Metadata, VaultConfig};
pub enum ExtensionExecuteMsg {
/// Execute Admin operations.
Admin(AdminExtensionExecuteMsg),
/// An interface of certain vault interaction with forced values for authz
Authz(AuthzExtension),
/// Rebalance our liquidity range based on an off-chain message
/// given to us by RANGE_ADMIN
ModifyRange(ModifyRangeMsg),
Expand All @@ -33,15 +31,6 @@ pub enum ExtensionExecuteMsg {
},
}

/// Extension messages for Authz. This interface basically reexports certain vault functionality
/// but sets recipient forcibly to None
#[cw_serde]
pub enum AuthzExtension {
ExactDeposit {},
AnyDeposit { max_slippage: Decimal },
Redeem { amount: Uint128 },
}

/// Apollo extension messages define functionality that is part of all apollo
/// vaults, but not part of the standard.
#[cw_serde]
Expand Down
Loading

0 comments on commit 1acb8a9

Please sign in to comment.