Repository: public-awesome/launchpad
Pull request #317 (2022-06-25 21:15:16)

Update Cargo metadata to publish contracts


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index a3e69927..c12bf175 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -606,11 +606,11 @@ dependencies = [
  "serde",
  "sg-multi-test 0.12.0",
  "sg-std 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sg-whitelist 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "sg1 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "sg721 0.12.0",
  "thiserror",
  "url",
- "whitelist",
 ]
 
 [[package]]
@@ -954,6 +954,45 @@ dependencies = [
  "cosmwasm-std",
 ]
 
+[[package]]
+name = "sg-whitelist"
+version = "0.12.1"
+dependencies = [
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cosmwasm-storage",
+ "cw-storage-plus",
+ "cw-utils",
+ "cw2",
+ "cw4",
+ "rust_decimal",
+ "schemars",
+ "serde",
+ "sg-std 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sg1 0.12.1",
+ "thiserror",
+]
+
+[[package]]
+name = "sg-whitelist"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a8f7abb26d34ede9d98312579e4a1cc00c83c2d725cc2f511e51fd88fa9dfa4"
+dependencies = [
+ "cosmwasm-std",
+ "cosmwasm-storage",
+ "cw-storage-plus",
+ "cw-utils",
+ "cw2",
+ "cw4",
+ "rust_decimal",
+ "schemars",
+ "serde",
+ "sg-std 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sg1 0.12.1",
+ "thiserror",
+]
+
 [[package]]
 name = "sg1"
 version = "0.12.1"
@@ -1192,25 +1231,6 @@ version = "0.10.2+wasi-snapshot-preview1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
 
-[[package]]
-name = "whitelist"
-version = "0.12.1"
-dependencies = [
- "cosmwasm-schema",
- "cosmwasm-std",
- "cosmwasm-storage",
- "cw-storage-plus",
- "cw-utils",
- "cw2",
- "cw4",
- "rust_decimal",
- "schemars",
- "serde",
- "sg-std 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "sg1 0.12.1",
- "thiserror",
-]
-
 [[package]]
 name = "zeroize"
 version = "1.5.5"
diff --git a/Cargo.toml b/Cargo.toml
index 2b41897c..0061b449 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,7 +5,7 @@ members = ["packages/*", "contracts/*"]
 codegen-units = 1
 incremental = false
 
-[profile.release.package.whitelist]
+[profile.release.package.sg-whitelist]
 codegen-units = 1
 incremental = false
 
diff --git a/contracts/minter/Cargo.toml b/contracts/minter/Cargo.toml
index 33b56ce1..3541509e 100644
--- a/contracts/minter/Cargo.toml
+++ b/contracts/minter/Cargo.toml
@@ -3,6 +3,8 @@ name = "minter"
 version = "0.13.0"
 authors = ["Jake Hartnell <jake@stargaze.zone>"]
 edition = "2018"
+description = "Stargaze NFT minter contract"
+license = "Apache-2.0"
 
 exclude = [
   # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
@@ -40,7 +42,7 @@ sg721 = { version = "0.12.0", features = ["library"] }
 thiserror = { version = "1.0" }
 url = "2.2.0"
 sg-std = "0.12.0"
-whitelist = { path = "../whitelist", features = ["library"] }
+sg-whitelist = { version = "0.12.1", features = ["library"] }
 cw721 = "0.13.2"
 cw721-base = { version = "0.13.2", features = ["library"] }
 sg1 = "0.13.0"
diff --git a/contracts/minter/src/contract.rs b/contracts/minter/src/contract.rs
index 47aab812..0ff5bda4 100644
--- a/contracts/minter/src/contract.rs
+++ b/contracts/minter/src/contract.rs
@@ -20,7 +20,7 @@ use crate::state::{
     Config, CONFIG, MINTABLE_NUM_TOKENS, MINTABLE_TOKEN_IDS, MINTER_ADDRS, SG721_ADDRESS,
 };
 use sg_std::{StargazeMsgWrapper, GENESIS_MINT_START_TIME, NATIVE_DENOM};
-use whitelist::msg::{
+use sg_whitelist::msg::{
     ConfigResponse as WhitelistConfigResponse, HasMemberResponse, QueryMsg as WhitelistQueryMsg,
 };
 
diff --git a/contracts/whitelist/Cargo.toml b/contracts/whitelist/Cargo.toml
index 6161d910..6d574dfa 100644
--- a/contracts/whitelist/Cargo.toml
+++ b/contracts/whitelist/Cargo.toml
@@ -1,8 +1,10 @@
 [package]
-name = "whitelist"
+name = "sg-whitelist"
 version = "0.12.1"
 authors = ["Shane Vitarana <s@noreply.publicawesome.com>"]
 edition = "2018"
+description = "Stargaze NFT whitelist contract"
+license = "Apache-2.0"
 
 exclude = [
   # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
diff --git a/contracts/whitelist/examples/schema.rs b/contracts/whitelist/examples/schema.rs
index 4e4e666f..61747daf 100644
--- a/contracts/whitelist/examples/schema.rs
+++ b/contracts/whitelist/examples/schema.rs
@@ -3,11 +3,11 @@ use std::fs::create_dir_all;
 
 use cosmwasm_schema::{export_schema, remove_schemas, schema_for};
 
-use whitelist::msg::{
+use sg_whitelist::msg::{
     ConfigResponse, ExecuteMsg, HasEndedResponse, HasMemberResponse, HasStartedResponse,
     InstantiateMsg, IsActiveResponse, MembersResponse, QueryMsg,
 };
-use whitelist::state::Config;
+use sg_whitelist::state::Config;
 
 fn main() {
     let mut out_dir = current_dir().unwrap();


Test patch:
diff --git a/contracts/minter/src/contract_tests.rs b/contracts/minter/src/contract_tests.rs
index f3473d11..ab27e070 100644
--- a/contracts/minter/src/contract_tests.rs
+++ b/contracts/minter/src/contract_tests.rs
@@ -8,8 +8,8 @@ use sg721::msg::{InstantiateMsg as Sg721InstantiateMsg, RoyaltyInfoResponse};
 use sg721::state::CollectionInfo;
 use sg_multi_test::StargazeApp;
 use sg_std::{StargazeMsgWrapper, GENESIS_MINT_START_TIME, NATIVE_DENOM};
-use whitelist::msg::InstantiateMsg as WhitelistInstantiateMsg;
-use whitelist::msg::{AddMembersMsg, ExecuteMsg as WhitelistExecuteMsg};
+use sg_whitelist::msg::InstantiateMsg as WhitelistInstantiateMsg;
+use sg_whitelist::msg::{AddMembersMsg, ExecuteMsg as WhitelistExecuteMsg};
 
 use crate::contract::instantiate;
 use crate::msg::{
@@ -33,9 +33,9 @@ fn custom_mock_app() -> StargazeApp {
 }
 pub fn contract_whitelist() -> Box<dyn Contract<StargazeMsgWrapper>> {
     let contract = ContractWrapper::new(
-        whitelist::contract::execute,
-        whitelist::contract::instantiate,
-        whitelist::contract::query,
+        sg_whitelist::contract::execute,
+        sg_whitelist::contract::instantiate,
+        sg_whitelist::contract::query,
     );
     Box::new(contract)
 }
diff --git a/e2e/full_test.go b/e2e/full_test.go
index fc1ec4f3..24844702 100644
--- a/e2e/full_test.go
+++ b/e2e/full_test.go
@@ -140,7 +140,7 @@ func TestMinter(t *testing.T) {
 	require.Equal(t, res.CodeID, uint64(1))
 
 	// whitelist
-	b, err = ioutil.ReadFile("contracts/whitelist.wasm")
+	b, err = ioutil.ReadFile("contracts/sg_whitelist.wasm")
 	require.NoError(t, err)
 
 	res, err = msgServer.StoreCode(sdk.WrapSDKContext(ctx), &wasmtypes.MsgStoreCode{
@@ -336,7 +336,7 @@ func TestWhitelistMinter(t *testing.T) {
 	require.Equal(t, res.CodeID, uint64(1))
 
 	// whitelist
-	b, err = ioutil.ReadFile("contracts/whitelist.wasm")
+	b, err = ioutil.ReadFile("contracts/sg_whitelist.wasm")
 	require.NoError(t, err)
 
 	res, err = msgServer.StoreCode(sdk.WrapSDKContext(ctx), &wasmtypes.MsgStoreCode{