-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add denoms with interface contract (#705)
- Loading branch information
Showing
14 changed files
with
374 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
smart-contracts/quasar/contracts/babylon-vault/schema/raw/response_to_lsts.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Array_of_LstInfo", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/LstInfo" | ||
}, | ||
"definitions": { | ||
"LstInfo": { | ||
"type": "object", | ||
"required": [ | ||
"denom", | ||
"interface" | ||
], | ||
"properties": { | ||
"denom": { | ||
"type": "string" | ||
}, | ||
"interface": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
smart-contracts/quasar/contracts/babylon-vault/schema/raw/response_to_lsts.json.orig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Array_of_LstInfo", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/LstInfo" | ||
}, | ||
"definitions": { | ||
"LstInfo": { | ||
"type": "object", | ||
"required": [ | ||
"denom", | ||
"interface" | ||
], | ||
"properties": { | ||
"denom": { | ||
"type": "string" | ||
}, | ||
"interface": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,7 @@ mod error; | |
pub mod msg; | ||
pub mod state; | ||
|
||
#[cfg(test)] | ||
mod tests; | ||
|
||
pub use crate::error::VaultError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
use cosmwasm_std::Addr; | ||
use cw_storage_plus::Map; | ||
use mars_owner::Owner; | ||
|
||
pub const OWNER: Owner = Owner::new("owner"); | ||
pub const LSTS: Map<String, Addr> = Map::new("lsts"); |
22 changes: 22 additions & 0 deletions
22
smart-contracts/quasar/contracts/babylon-vault/src/tests/instantiate.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use crate::tests::setup::{OWNER, USER}; | ||
use crate::{contract::instantiate, msg::InstantiateMsg}; | ||
use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info}; | ||
|
||
#[test] | ||
fn test_instantiate() { | ||
let mut deps = mock_dependencies(); | ||
let env = mock_env(); | ||
let info = mock_info(USER, &[]); | ||
|
||
let result = instantiate( | ||
deps.as_mut(), | ||
env, | ||
info, | ||
InstantiateMsg { | ||
owner: OWNER.to_string(), | ||
}, | ||
); | ||
assert!(result.is_ok()); | ||
let response = result.unwrap(); | ||
assert_eq!(response.messages.len(), 0); | ||
} |
3 changes: 3 additions & 0 deletions
3
smart-contracts/quasar/contracts/babylon-vault/src/tests/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub mod instantiate; | ||
pub mod register; | ||
pub mod setup; |
Oops, something went wrong.