Skip to content

Commit

Permalink
adding changes for migration
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPresident committed Oct 24, 2023

Verified

This commit was signed with the committer’s verified signature.
jettcc Jettcc
1 parent 40ece0a commit 1c8665e
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/snip20_derivative/Cargo.toml
Original file line number Diff line number Diff line change
@@ -38,11 +38,11 @@ shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol", fe
"snip20",
"storage_plus",
] }
secret-toolkit = { version = "0.7.0", features = [
secret-toolkit = { version = "0.10.0", features = [
"permit",
"viewing-key",
] }
secret-toolkit-crypto = { version = "0.7.0", features = ["rand", "hash"]}
secret-toolkit-crypto = { version = "0.10.0", features = ["rand", "hash"]}

schemars = "0.8.11"
serde = { version = "1.0.114", default-features = false, features = ["derive"] }
3 changes: 1 addition & 2 deletions packages/shade_protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -112,12 +112,11 @@ cosmwasm-std = { package = "secret-cosmwasm-std", version = "1.0.0" }
cosmwasm-storage = { package = "secret-cosmwasm-storage", version = "1.0.0" }
cosmwasm-schema = "1.1.5"
contract-derive = { version = "0.1.0", path = "../contract_derive" }

schemars = "0.8.9"
serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] }
thiserror = "1.0"

secret-storage-plus = { git = "https://github.com/securesecrets/secret-plus-utils", version = "0.13.4", optional = true }
secret-storage-plus = { git = "https://github.com/securesecrets/secret-plus-utils", tag = "v0.1.1", optional = true, features = ["iterator"] }

# Testing
anyhow = { version = "1", optional = true }
3 changes: 3 additions & 0 deletions packages/shade_protocol/src/contract_interfaces/mod.rs
Original file line number Diff line number Diff line change
@@ -44,3 +44,6 @@ pub mod basic_staking;

#[cfg(feature = "snip20_migration")]
pub mod snip20_migration;

#[cfg(feature = "swap")]
pub mod swap;
3 changes: 3 additions & 0 deletions packages/shade_protocol/src/utils/callback.rs
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ pub trait InstantiateCallback: Serialize {
code_id: u64,
code_hash: String,
funds: Vec<Coin>,
admin: Option<String>,
) -> StdResult<CosmosMsg> {
let mut msg = to_binary(self)?;
// can not have 0 block size
@@ -64,6 +65,7 @@ pub trait InstantiateCallback: Serialize {
msg,
label,
funds,
admin,
};
Ok(init.into())
}
@@ -321,6 +323,7 @@ mod tests {
code_hash,
funds,
label,
admin: None,
}) => {
assert_eq!(code_id, id);
let mut expected_msg = r#"{"f1":1,"f2":2}"#.as_bytes().to_vec();

0 comments on commit 1c8665e

Please sign in to comment.