-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synch Dev-net > main See merge request adnan/omniflix-launchpad!19
- Loading branch information
Showing
193 changed files
with
20,433 additions
and
3,154 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,9 @@ tarpaulin-report.html | |
# Text file backups | ||
**/*.rs.bk | ||
|
||
# macOS | ||
.DS_Store | ||
|
||
# IDEs | ||
*.iml | ||
.idea | ||
|
||
/ts/node_modules |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,110 +1,14 @@ | ||
# Omniflix Launchpad Readme | ||
# Omniflix Launchpad | ||
|
||
## Omniflix Launchpad Contracts | ||
|
||
This repository contains the smart contracts for the Omniflix Launchpad platform. These contracts are responsible for launching an NFT collection. | ||
|
||
## Contracts | ||
## Factories | ||
|
||
- Omniflix-whitelist | ||
- Omniflix-minter | ||
Launchpad utilizes a singleton structure for each collection that is released through this launchpad. The purpose of the factories is to create an instance of minters and whitelist contracts. | ||
|
||
## Contract Overview | ||
## Design | ||
<img src="launchpad-design.png" align="center" height="300" width="1000"/> | ||
|
||
### Minter | ||
|
||
The Minter contract is the primary component of the launchpad. | ||
|
||
#### Instantiate | ||
|
||
- During instantiation, the creator should send Collection details along with trading information such as price, denomination, and trading start time. | ||
- The creator also has the option to send `Rounds`. | ||
- Currently, there are two types of rounds. | ||
- During instantiation, one of these types should be included inside an array. | ||
- The creator can add as many rounds as desired, but overlapping rounds are not permitted and will cause an error. | ||
|
||
#### WhitelistAddress | ||
``` | ||
{ | ||
address: Addr, | ||
start_time: Option<Timestamp>, | ||
end_time: Option<Timestamp>, | ||
mint_price: Uint128, | ||
round_limit: u32, | ||
} | ||
``` | ||
|
||
#### WhitelistCollection | ||
``` | ||
{ | ||
collection_id: String, | ||
start_time: Timestamp, | ||
end_time: Timestamp, | ||
mint_price: Uint128, | ||
round_limit: u32, | ||
} | ||
``` | ||
|
||
- `Whitelist address` | ||
- This whitelist type refers to the whitelist contract in our launchpad. To use it, you need to instantiate it and send its address to the minter along with the other parameters. | ||
- The optional parts do not need to be sent. When instantiating, the minter contract ignores these parameters and queries the corresponding whitelist contract. | ||
- `Whitelist collection` | ||
- This whitelist is used to allow specific collections that are already created and have token holders. The contract checks the specified collection to determine if the round is active and if the buyer actually possesses at least one of those tokens. If these conditions are met, the user will be granted permission for private minting. | ||
|
||
#### Mint | ||
|
||
- There are two types of minting: `Mint{}` and `AdminMint{}` | ||
- `Mint{}`: This option is for users who want to own the NFT, and they need to pay the active price at that time. | ||
- `AdminMint{}`: As the name suggests, this option is specifically for admin to mint a token. Admins have the ability to determine the recipient and specify the token ID. If the ID is available, it will be minted. Admins are not subject to address limits or private mint checks, and this action does not require a payment. | ||
|
||
#### RemoveRound | ||
|
||
#### AddRound | ||
|
||
- Creator has the ability to add or remove rounds as they please. When adding overlapping rounds are still not permitted and rounds that already started cannot be added nor removed. | ||
|
||
#### UpdateCollectionRound | ||
- Creator has the ability to update the collection round. This is useful when the creator wants to change the collection ID, start time, end time, or mint price. This function is only available for collection rounds. | ||
|
||
#### UpdateWhitelistRound | ||
- This function is can not be used by the creator. It is only available for the whitelist contract to update the whitelist round. This is useful when the creator wants to change the start time, end time, or mint price. This changes happen on the whitelist contract. But the whitelist contract updates this round on the minter contract. | ||
|
||
#### BurnRemainingTokens | ||
|
||
- We cannot technically burn tokens because burnable ones are the ones that are not minted yet. If executed by the creator, this minter will not mint any other token. | ||
|
||
#### UpdateRoyaltyRatio | ||
- This function allows the creator to change the royalty ratio for the NFTs minted through the launchpad. The royalty ratio determines the percentage of each subsequent resale of an NFT that is paid to the original creator as royalties. | ||
|
||
#### UpdateMintPrice | ||
- This function permits the creator to modify the mint price. This only affects the price of the public mint. | ||
|
||
#### RandomizeList | ||
|
||
- Creator has the ability to randomize token list. It's only gated by the creator because this operation is costly. In the future, a small fee could be collected from whoever wants to randomize the list. | ||
|
||
### Whitelist | ||
|
||
The Whitelist contract maintains a list of addresses that are eligible to participate in the token sale. | ||
|
||
#### Instantiate | ||
|
||
- Upon instantiation, the creator should send the start and end time of this whitelist along with the mint price and an array of valid addresses. | ||
|
||
#### Execute | ||
|
||
- `UpdateEndTime`: This message is used to update the end time of the whitelist. The `end_time` parameter should be provided along with an optional `minter_address` parameter. | ||
- `UpdateMintPrice`: This message is used to update the mint price of the whitelist. The `mint_price` parameter should be provided along with an optional `minter_address` parameter. | ||
- `UpdatePerAddressLimit`: This message is used to update the per-address limit of the whitelist. The `amount` parameter should be the new limit, and an optional `minter_address` parameter can be provided. | ||
- `UpdateStartTime`: This message is used to change the start time of the whitelist. The `start_time` parameter should be provided along with an optional `minter_address` parameter. | ||
- If the creator has a specific minter contract that is already using this contract as one of its rounds, they are expected to provide the minter address. | ||
- In such cases, the parameters for each contract will be different, which may cause overlap. Therefore, if the minter address is provided, the whitelist contract will attempt to update the parameter on the minter contract. (Note: On the minter contract, the whitelist round can only be updated from the whitelist address.) | ||
- `AddMembers`: This message is used to add new addresses to the whitelist. The `addresses` parameter should be an array of valid addresses. | ||
- `RemoveMembers`: This message is used to remove addresses from the whitelist. The `addresses` parameter should be an array of valid addresses. | ||
- `IncreaseMemberLimit`: This message is used to increase the member limit of the whitelist by a specified amount. | ||
- `UpdateAdmin`: This message is used to update the admin of the whitelist. The `admin` parameter should be the new admin address. | ||
- `Freeze`: This message is used to freeze the whitelist, preventing any further changes. | ||
|
||
## Contributing | ||
|
||
If you would like to contribute to the Omniflix Launchpad contracts, please follow the guidelines outlined in [CONTRIBUTING.md](http://contributing.md/). We welcome all contributions, from bug fixes to feature enhancements. |
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,4 +1,8 @@ | ||
b7c2653138a5890ed7b6156e86ac69814659d337afbc82cedfa674bc645a6127 omniflix_minter.wasm | ||
aee5e28735bf9f1be6fd58ec8cbe808318ed7c2bd0ab4466286aa2ad05644530 omniflix_minter_factory.wasm | ||
1fa98bb2fafdca70bbb9d2b88cefe5d3d2329abab38ea3a8f58c4293dfcd5bab omniflix_round_whitelist_factory.wasm | ||
5e0f8ff75a4cd213193d110ca67a9bdf41a6939d88437a0643debc068c4d9361 round_whitelist.wasm | ||
433cd724fa9863f244b4dcfcf8dd63b8925e9c812ad7f8693cf1f4742918316d omniflix_minter.wasm | ||
6d9047339a8289cf0a353d06ea7317472d421a1e92548c128629699a384301dd omniflix_minter_factory.wasm | ||
582f94b015f272ba75fe5a6414929411aa82eac2a082738f4933201e6918fb63 omniflix_multi_mint_open_edition_minter.wasm | ||
96649782494a4fa73fb3154dc3af0f87759865790caae82be9c33870cd4117a9 omniflix_open_edition_minter.wasm | ||
ca1121e0137961ae9a7838413b5b0cda4fc800ed50cc717cc3c1796bdbe9e4e2 omniflix_open_edition_minter_copy.wasm | ||
dc6fcb2312463c61966b2b660c8626c1139aac09052cf71d3dcffdb0bcbc25cf omniflix_open_edition_minter_factory.wasm | ||
6857583230ddcec6d9fefb3e648a9a0a179d821fa7a7f96efda3d6a4186f5d77 omniflix_round_whitelist.wasm | ||
6cd989d33877aa51a89069aa33d2b50ed9b1b64be390dd45a1cb09ff4a1dfd92 omniflix_round_whitelist_factory.wasm |
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,4 +1,8 @@ | ||
055f4e6ac28e088bcca646193b22a2b8d2aa22daad1ea7734f6ab7f59c6c0ad1 target/wasm32-unknown-unknown/release/omniflix_whitelist.wasm | ||
4e63872e680b28c46e3b82add56b88487513cc2eea8813ba32b4a8d9b4af723c target/wasm32-unknown-unknown/release/omniflix_minter.wasm | ||
dfaec6ddcd3d5d19bb8e57576d3f523e34f0803bc8101336c70d4ca686d42d89 target/wasm32-unknown-unknown/release/omniflix_minter_factory.wasm | ||
f4ab42064635ede862c4741aca77c3f3471dd5a0a4177ee8be8af21a25b6dc59 target/wasm32-unknown-unknown/release/round_whitelist.wasm | ||
0ff723cd6bcf7c3067ff0df7d9bf1f227efe4fff2b0c2324bc84b95216eb2e72 target/wasm32-unknown-unknown/release/omniflix_minter.wasm | ||
2ce6b8be1a56977db759b79ce638db6d70cf655d477ece99d1b52be4a37035af target/wasm32-unknown-unknown/release/omniflix_minter_factory.wasm | ||
fab80e19deab3b947612593c762e04817dbf07b0445d88e95fbdae2c16d26efa target/wasm32-unknown-unknown/release/omniflix_multi_mint_open_edition_minter.wasm | ||
55b6dd86e2cd23a6643ec812ec709ce81ea990a360ab6b4ebb4bd14776495133 target/wasm32-unknown-unknown/release/omniflix_open_edition_minter.wasm | ||
c20531d46d46c57955320f9e1464a4a4cc87fd0aa6c139355b6b866735125ee0 target/wasm32-unknown-unknown/release/omniflix_open_edition_minter_copy.wasm | ||
3ddff97914a8380acea013271838754552904e07d58a9e4d8d6e2d08756cefb8 target/wasm32-unknown-unknown/release/omniflix_open_edition_minter_factory.wasm | ||
d1ea2c4ac7e9bebd4a4ebd70d8f0ce6436979c7f5e9bcbbdaf255ab79e9f38b6 target/wasm32-unknown-unknown/release/omniflix_round_whitelist.wasm | ||
36dd84428a9c11c9b2ae07be2f02def5b1a7b3a78bfb2093ed76f90b1fee3643 target/wasm32-unknown-unknown/release/omniflix_round_whitelist_factory.wasm |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,4 +1,4 @@ | ||
[alias] | ||
wasm = "build --release --lib --target wasm32-unknown-unknown" | ||
unit-test = "test --lib" | ||
schema = "run --bin schema" | ||
schema = "run schema" |
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
Oops, something went wrong.