Skip to content

Commit

Permalink
new endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
juliancwirko committed May 2, 2022
1 parent 8ffe178 commit f414d94
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### [1.6.2](https://github.com/ElvenTools/elven-nft-minter-sc/releases/tag/v1.6.2) (2022-05-02)
- new endpoints:
- `getTotalSupply` - total collection supply
- `isMintingPaused` - check if minting is currently paused
- `getTotalSupplyOfCurrentDrop` - total supply per current drop

### [1.6.1](https://github.com/ElvenTools/elven-nft-minter-sc/releases/tag/v1.6.1) (2022-04-30)
- new endpoint `clearAllowlist` - It will clear the whole allowlist. The best is to keep max 1300 addresses in the allowlist at a time. Of course, if only you plan to clear it later. If you keep more and want to clear it, you can reach the gas limit for a transaction. So it would be best to split the allowlist per drop, keep it as small as possible and clear it each time.
- new endpoint `removeAllowlistAddress` - removes singe address from allowlist
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "elven-nft-minter"
version = "1.6.1"
version = "1.6.2"
authors = ["Julian Ćwirko <julian.cwirko@gmail.com>"]
edition = "2018"
publish = false
Expand Down
4 changes: 2 additions & 2 deletions meta/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion meta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "elven-nft-minter-meta"
version = "1.6.1"
version = "1.6.2"
authors = ["Julian Ćwirko <julian.cwirko@gmail.com>"]
edition = "2018"
publish = false
Expand Down
32 changes: 31 additions & 1 deletion output/elven-nft-minter.abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"contractCrate": {
"name": "elven-nft-minter",
"version": "1.6.1"
"version": "1.6.2"
},
"framework": {
"name": "elrond-wasm",
Expand Down Expand Up @@ -440,6 +440,36 @@
"type": "bool"
}
]
},
{
"name": "getTotalSupply",
"mutability": "readonly",
"inputs": [],
"outputs": [
{
"type": "u32"
}
]
},
{
"name": "isMintingPaused",
"mutability": "readonly",
"inputs": [],
"outputs": [
{
"type": "bool"
}
]
},
{
"name": "getTotalSupplyOfCurrentDrop",
"mutability": "readonly",
"inputs": [],
"outputs": [
{
"type": "u32"
}
]
}
],
"hasCallback": true,
Expand Down
Binary file modified output/elven-nft-minter.wasm
Binary file not shown.
21 changes: 12 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,18 @@ pub trait ElvenTools {
#[storage_mapper("isDropActive")]
fn is_drop_active(&self) -> SingleValueMapper<bool>;

#[view(getTotalSupply)]
#[storage_mapper("amountOfTokensTotal")]
fn amount_of_tokens_total(&self) -> SingleValueMapper<u32>;

#[view(isMintingPaused)]
#[storage_mapper("paused")]
fn paused(&self) -> SingleValueMapper<bool>;

#[view(getTotalSupplyOfCurrentDrop)]
#[storage_mapper("amountOfTokensPerDrop")]
fn amount_of_tokens_per_drop(&self) -> SingleValueMapper<u32>;

#[storage_mapper("lastDrop")]
fn last_drop(&self) -> SingleValueMapper<u16>;

Expand All @@ -808,9 +820,6 @@ pub trait ElvenTools {
#[storage_mapper("file_extension")]
fn file_extension(&self) -> SingleValueMapper<ManagedBuffer>;

#[storage_mapper("amountOfTokensTotal")]
fn amount_of_tokens_total(&self) -> SingleValueMapper<u32>;

#[storage_mapper("mintedIndexesTotal")]
fn minted_indexes_total(&self) -> SingleValueMapper<u32>;

Expand All @@ -820,15 +829,9 @@ pub trait ElvenTools {
#[storage_mapper("royalties")]
fn royalties(&self) -> SingleValueMapper<BigUint>;

#[storage_mapper("paused")]
fn paused(&self) -> SingleValueMapper<bool>;

#[storage_mapper("tags")]
fn tags(&self) -> SingleValueMapper<ManagedBuffer>;

#[storage_mapper("amountOfTokensPerDrop")]
fn amount_of_tokens_per_drop(&self) -> SingleValueMapper<u32>;

#[storage_mapper("nextIndexToMint")]
fn next_index_to_mint(&self) -> SingleValueMapper<(usize, u32)>;

Expand Down
4 changes: 2 additions & 2 deletions wasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "elven-nft-minter-wasm"
version = "1.6.1"
version = "1.6.2"
authors = ["Julian Ćwirko <julian.cwirko@gmail.com>"]
edition = "2018"
publish = false
Expand Down
3 changes: 3 additions & 0 deletions wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ elrond_wasm_node::wasm_endpoints! {
getProvenanceHash
getTokensLimitPerAddressPerDrop
getTokensLimitPerAddressTotal
getTotalSupply
getTotalSupplyOfCurrentDrop
getTotalTokensLeft
giveaway
isAllowlistEnabled
isDropActive
isMintingPaused
issueToken
mint
pauseMinting
Expand Down

0 comments on commit f414d94

Please sign in to comment.