Skip to content

Commit

Permalink
Merge branch 'master' into keyne/authz-contract
Browse files Browse the repository at this point in the history
  • Loading branch information
keyleu authored Nov 6, 2023
2 parents 51e8740 + 98b46c1 commit a13a5d2
Show file tree
Hide file tree
Showing 12 changed files with 754 additions and 205 deletions.
384 changes: 268 additions & 116 deletions integration-tests/contracts/modules/ft/Cargo.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions integration-tests/contracts/modules/ft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = "1.2.5"
cosmwasm-storage = "1.2.5"
cw-storage-plus = "1.0.1"
cw2 = "1.1.0"
thiserror = "1.0.40"
coreum-wasm-sdk = "0.1.3"
cosmwasm-schema = "1.2.6"
cosmwasm-std = "1.4.1"
cosmwasm-storage = "1.4.1"
cw-storage-plus = "1.1.0"
cw2 = "1.1.1"
thiserror = "1.0.50"
coreum-wasm-sdk = "0.2.1"
cosmwasm-schema = "1.4.1"
cw-ownable = "0.5.1"
2 changes: 2 additions & 0 deletions integration-tests/contracts/modules/ft/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ pub fn instantiate(
features: msg.features,
burn_rate: msg.burn_rate,
send_commission_rate: msg.send_commission_rate,
uri: msg.uri,
uri_hash: msg.uri_hash,
});

let denom = format!("{}-{}", msg.subunit, env.contract.address).to_lowercase();
Expand Down
6 changes: 4 additions & 2 deletions integration-tests/contracts/modules/ft/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ pub struct InstantiateMsg {
pub initial_amount: Uint128,
pub description: Option<String>,
pub features: Option<Vec<u32>>,
pub burn_rate: Option<String>,
pub send_commission_rate: Option<String>,
pub burn_rate: String,
pub send_commission_rate: String,
pub uri: Option<String>,
pub uri_hash: Option<String>,
}

#[cw_serde]
Expand Down
26 changes: 19 additions & 7 deletions integration-tests/contracts/modules/nft.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ type NftIDRequest struct {
ID string `json:"id"`
}

// NftAccountRequest is used to query NFT with Account.
type NftAccountRequest struct {
Account string `json:"account"`
}

// BurntNftIDRequest is used to query burnt nfts with nft_id.
//
//nolint:tagliatelle
Expand Down Expand Up @@ -70,20 +75,27 @@ type NftMethod string
// all the methods used for smart contract.
const (
// transactions.
NftMethodMint NftMethod = "mint"
NftMethodBurn NftMethod = "burn"
NftMethodFreeze NftMethod = "freeze"
NftMethodUnfreeze NftMethod = "unfreeze"
NftMethodAddToWhitelist NftMethod = "add_to_whitelist"
NftMethodRemoveFromWhiteList NftMethod = "remove_from_whitelist"
NftMethodSend NftMethod = "send"
NftMethodMint NftMethod = "mint"
NftMethodBurn NftMethod = "burn"
NftMethodFreeze NftMethod = "freeze"
NftMethodUnfreeze NftMethod = "unfreeze"
NftMethodClassFreeze NftMethod = "class_freeze"
NftMethodClassUnfreeze NftMethod = "class_unfreeze"
NftMethodAddToWhitelist NftMethod = "add_to_whitelist"
NftMethodRemoveFromWhiteList NftMethod = "remove_from_whitelist"
NftMethodAddToClassWhitelist NftMethod = "add_to_class_whitelist"
NftMethodRemoveFromClassWhitelist NftMethod = "remove_from_class_whitelist"
NftMethodSend NftMethod = "send"
// queries.
NftMethodParams NftMethod = "params"
NftMethodClass NftMethod = "class"
NftMethodClasses NftMethod = "classes"
NftMethodFrozen NftMethod = "frozen"
NftMethodClassFrozen NftMethod = "class_frozen"
NftMethodClassFrozenAccounts NftMethod = "class_frozen_accounts"
NftMethodWhitelisted NftMethod = "whitelisted"
NftMethodWhitelistedAccountsForNft NftMethod = "whitelisted_accounts_for_nft"
NftMethodClassWhitelistedAccounts NftMethod = "class_whitelisted_accounts"
NftMethodBurntNft NftMethod = "burnt_nft"
NftMethodBurntNftInClass NftMethod = "burnt_nfts_in_class"
NftMethodBalance NftMethod = "balance"
Expand Down
Loading

0 comments on commit a13a5d2

Please sign in to comment.