2019-06-04 13:38:55 +00:00
|
|
|
# Status.im Sticker Market Dapp
|
|
|
|
|
2024-02-15 08:40:51 +00:00
|
|
|
|
|
|
|
## Deployments
|
|
|
|
|
|
|
|
| **Contract** | **Address** |
|
|
|
|
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
| **Mainnet** | | |
|
|
|
|
| StickerMarket | [`0x12824271339304d3a9f7e096e62a2a7e73b4a7e7`](https://etherscan.io/address/0x12824271339304d3a9f7e096e62a2a7e73b4a7e7#code) |
|
|
|
|
| StickerPack | [`0x110101156e8F0743948B2A61aFcf3994A8Fb172e`](https://etherscan.io/address/0x110101156e8F0743948B2A61aFcf3994A8Fb172e#code) |
|
|
|
|
| StickerType | [`0x0577215622f43a39f4bc9640806dfea9b10d2a36`](https://etherscan.io/address/0x0577215622f43a39f4bc9640806dfea9b10d2a36#code) |
|
|
|
|
| **Sepolia** | | |
|
|
|
|
| StickerMarket | [`0xf852198D0385c4B871E0B91804ecd47C6bA97351`](https://sepolia.etherscan.io/address/0xf852198d0385c4b871e0b91804ecd47c6ba97351#code) |
|
|
|
|
| StickerPack | [`0x8cc272396Be7583c65BEe82CD7b743c69A87287D`](https://sepolia.etherscan.io/address/0x8cc272396be7583c65bee82cd7b743c69a87287d#code) |
|
|
|
|
| StickerType | [`0x5aCBae26C23427AEeE0A7f26949f093577a61AAb`](https://sepolia.etherscan.io/address/0x5acbae26c23427aeee0a7f26949f093577a61aab#code) |
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-04 13:38:55 +00:00
|
|
|
## Folders
|
|
|
|
- `analyzers`: Folder for analyzer output files
|
|
|
|
- `app`: Folder containing application for moving Status Test Tokens
|
|
|
|
- `config`: Embark config files
|
|
|
|
- `development`: folder for development network specific config
|
|
|
|
- `genesis.json`: configure genesis for development network
|
|
|
|
- `blockchain.js`
|
|
|
|
- `communication.js`
|
|
|
|
- `contracts.js`
|
|
|
|
- `namesystem.js`
|
|
|
|
- `storage.js`
|
|
|
|
- `webserver.js`
|
2019-06-04 14:47:05 +00:00
|
|
|
- `contracts`: Folder for storing all Solidity contracts
|
|
|
|
- `common`: Common standard contracts
|
|
|
|
- `status`: Status specific contracts
|
2019-06-04 18:42:42 +00:00
|
|
|
- `sticker-market`: Sticker Market specific contracts
|
|
|
|
- `StickerMarket.sol`: **Main Sticker Market Logic here**
|
|
|
|
- `StickerMarketMigrated.sol`: Example of upgrade logic and a contract that controls the old `StickerMarket.sol`.
|
2019-06-04 14:47:05 +00:00
|
|
|
- `token`: Standard token contracts
|
2019-06-04 13:38:55 +00:00
|
|
|
- `doc`
|
|
|
|
- `project_questions.md`: file answering a list of questions around project status
|
|
|
|
- `specification.md`: current specefication document
|
|
|
|
- `test`: Folder for tests
|
|
|
|
|
|
|
|
## How to run
|
2019-06-03 19:57:37 +00:00
|
|
|
Usage:
|
2019-06-04 13:38:55 +00:00
|
|
|
```bash
|
2019-06-04 16:16:23 +00:00
|
|
|
git clone https://github.com/status-im/sticker-market.git
|
|
|
|
cd sticker-market
|
|
|
|
npm install
|
|
|
|
npm start
|
2019-06-03 19:57:37 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
| Contract | Deploy | Test | UI |
|
|
|
|
| -------------------------------------- | ------ | ---- | --- |
|
|
|
|
| token/TestToken | Yes | Yes | Yes |
|
|
|
|
| token/ERC20Token | No | Yes | Yes |
|
2019-06-04 18:42:42 +00:00
|
|
|
|
|
|
|
## How to run tests
|
|
|
|
Usage:
|
|
|
|
```bash
|
|
|
|
$ npx embark test ./test/stickermarket.js
|
|
|
|
|
|
|
|
|
|
|
|
Compiling contracts
|
|
|
|
contracts/status/sticker-market/README.md doesn't have a compatible contract compiler. Maybe a plugin exists for it.
|
|
|
|
contracts/status/sticker-market/README.md doesn't have a compatible contract compiler. Maybe a plugin exists for it.
|
|
|
|
StickerMarket
|
2019-06-05 02:08:19 +00:00
|
|
|
✓ should register packs (1120ms) - [3592664 gas]
|
|
|
|
✓ should categorize packs (894ms) - [810984 gas]
|
|
|
|
✓ should uncategorize packs (971ms) - [288564 gas]
|
|
|
|
✓ should mint packs (1855ms) - [3842190 gas]
|
|
|
|
✓ should mint packs with approveAndCall (1920ms) - [3589096 gas]
|
|
|
|
✓ should register pack with approveAndCall (438ms) - [904022 gas]
|
|
|
|
✓ should purge packs (474ms) - [361631 gas]
|
|
|
|
✓ should not mint a pack with price 0 (275ms) - [466774 gas]
|
|
|
|
✓ should change ownership of pack by user (122ms) - [302190 gas]
|
|
|
|
✓ should change ownership of pack by controller (120ms) - [301833 gas]
|
|
|
|
✓ should change price of pack by user (156ms) - [320666 gas]
|
|
|
|
✓ should change price of pack by controller (119ms) - [335373 gas]
|
|
|
|
✓ should change pack mintability by user (122ms) - [315775 gas]
|
|
|
|
✓ should change pack mintability by controller (126ms) - [315418 gas]
|
|
|
|
✓ should change pack contenthash by controller (186ms) - [320989 gas]
|
|
|
|
✓ should migrate registry (292ms) - [596407 gas]
|
|
|
|
|
|
|
|
|
|
|
|
16 passing (10s) - [Total: 31234047 gas]
|
2024-02-15 08:40:51 +00:00
|
|
|
```
|