Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
0.7.0 Release (#406)
Browse files Browse the repository at this point in the history
Co-authored-by: jacobarluck <[email protected]>
Co-authored-by: Joshua Dechant <[email protected]>
Co-authored-by: Philip Diaz <[email protected]>
Co-authored-by: lambdahands <[email protected]>
Co-authored-by: Gregório Granado Magalhães <[email protected]>
Co-authored-by: Jev Björsell <[email protected]>
Co-authored-by: maelswarm <[email protected]>
Co-authored-by: Rick Love <[email protected]>
  • Loading branch information
9 people authored Apr 30, 2021
1 parent cfa6b8e commit a827743
Show file tree
Hide file tree
Showing 52 changed files with 2,068 additions and 907 deletions.
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ OpenMinter supports the following networks and software components:
#### 🎨 Multimedia NFTs powered by [TZIP-21](https://tzip.tezosagora.org/proposal/tzip-21/)
#### ⚙️ Smart contracts based on [minter-sdk](https://github.com/tqtezos/minter-sdk)
#### 👛 Wallets compatible with [Beacon](https://www.walletbeacon.io/)
#### 📖 Indexing via [Better Call Dev][bcdhub]
#### 📖 Indexing via [tzkt][https://api.tzkt.io/]
#### 🚀 [IPFS](https://ipfs.io/) via a local node or [Pinata](https://pinata.cloud/)

The following dependencies are required to run OpenMinter.
Expand Down Expand Up @@ -96,8 +96,7 @@ To install and build the dependences required for local development, run:
$ yarn install
```
The installation process will fetch toplevel NPM dependences and build
the `minter-ui-dev` and `minter-api-dev` Docker images.
The installation process will fetch toplevel NPM dependences
### Running
Expand All @@ -113,6 +112,32 @@ To run OpenMinter configured for `mainnet`, run:
yarn start:mainnet
```
### Bootstrapping Your Own Contracts
OpenMinter ships with a set of contracts on mainnet and testnet that are intended
only as a reference implementation and demo. In most cases, you will want to
originate your own contracts to run OpenMinter. OpenMinter includes a configuration
wizard CLI tool to make this process quick and easy.
To start the configuration wizard, run:
```sh
yarn bootstrap
```
Once the configuration wizard is complete, you can run OpenMinter with your
custom config by running:
```sh
yarn start:custom
```
And to build OpenMinter for a production deployment with your custom config, run:
```sh
yarn build:custom
```
## Sandboxed Mode
Sandboxed mode is available for OpenMinter for local testing purposes. Make sure
Expand Down
8 changes: 6 additions & 2 deletions config/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"api": "https://api.better-call.dev",
"gui": "https://better-call.dev"
},
"tzkt": {
"api": "https://staging.api.mainnet.tzkt.io"
},
"contracts": {
"nftFaucet": "KT1QcxwB4QyPKfmSwjH1VRxa6kquUjeDWeEy",
"marketplace": {
Expand All @@ -13,5 +16,6 @@
}
}
},
"ipfsApi": "https://minter-api.tqhosted.com"
}
"ipfsApi": "https://minter-api.tqhosted.com",
"ipfsGateway": "https://tqtezos.mypinata.cloud"
}
3 changes: 2 additions & 1 deletion config/sandbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
}
}
},
"ipfsApi": "http://localhost:3300"
"ipfsApi": "http://localhost:3300",
"ipfsGateway": "http://localhost:8080"
}
8 changes: 6 additions & 2 deletions config/testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"api": "https://api.better-call.dev",
"gui": "https://better-call.dev"
},
"tzkt": {
"api": "https://staging.api.edo2net.tzkt.io"
},
"contracts": {
"nftFaucet": "KT1Hagc5XQYzkX7HfRbUNXdi4CBfiENzbHiU",
"marketplace": {
Expand All @@ -13,5 +16,6 @@
}
}
},
"ipfsApi": "https://minter-api.tqhosted.com"
}
"ipfsApi": "https://minter-api.tqhosted.com",
"ipfsGateway": "https://tqtezos.mypinata.cloud"
}
22 changes: 19 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "client",
"version": "0.2.0",
"version": "0.7.0",
"private": true,
"license": "MIT",
"dependencies": {
"@chakra-ui/react": "1.1.2",
"@emotion/core": "10.0.28",
Expand All @@ -11,25 +12,31 @@
"@taquito/beacon-wallet": "8.1.0",
"@taquito/signer": "8.1.0",
"@taquito/taquito": "8.1.0",
"@taquito/tzip16": "8.1.0",
"@taquito/tzip12": "8.1.0",
"@tqtezos/minter-contracts": "1.0.3",
"@taquito/tzip16": "8.1.0",
"@tqtezos/minter-contracts": "1.2.0",
"@types/lodash": "4.14.165",
"@types/react": "16.9.12",
"@types/react-dom": "16.9.0",
"@types/react-dropzone": "5.1.0",
"@types/react-redux": "7.1.16",
"axios-retry": "3.1.9",
"buffer": "6.0.3",
"clear": "0.1.0",
"clui": "0.3.6",
"figlet": "1.5.0",
"fp-ts": "2.10.3",
"framer-motion": "3.1.4",
"immer": "8.0.0",
"io-ts": "2.2.16",
"joi": "17.3.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-dropzone": "11.2.4",
"react-feather": "2.0.9",
"react-icons": "4.2.0",
"react-redux": "7.2.2",
"shelljs": "0.8.4",
"typescript": "4.1.3",
"wouter": "2.5.1"
},
Expand All @@ -39,8 +46,13 @@
"@testing-library/user-event": "7.1.2",
"@tsed/logger": "5.5.2",
"@types/async-retry": "1.4.2",
"@types/clear": "0.1.1",
"@types/clui": "0.3.0",
"@types/configstore": "4.0.0",
"@types/figlet": "1.5.1",
"@types/inquirer": "7.3.1",
"@types/jest": "24.0.0",
"@types/shelljs": "0.8.8",
"async-retry": "1.3.1",
"axios": "0.21.1",
"configstore": "5.0.1",
Expand All @@ -53,10 +65,14 @@
"start:testnet": "cp ./config/testnet.json src/config.json && react-scripts start",
"start:sandbox": "cp ./config/sandbox-bootstrapped.json src/config.json && react-scripts start",
"start:mainnet": "cp ./config/mainnet.json src/config.json && react-scripts start",
"start:custom": "cp ./config/custom-bootstrapped.json src/config.json && react-scripts start",
"build": "react-scripts build",
"build:custom": "cp ./config/custom-bootstrapped.json src/config.json && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"bootstrap": "ts-node -P scripts/tsconfig.json scripts/bootstrap.ts",
"bootstrap:contracts": "ts-node -P scripts/tsconfig.json scripts/bootstrap-contracts-config.ts",
"bootstrap:custom": "yarn bootstrap:contracts custom",
"bootstrap:sandbox": "docker-compose down && docker-compose up -d && yarn bootstrap:contracts sandbox",
"teardown:sandbox": "docker-compose down"
},
Expand Down
4 changes: 4 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
}
});
</script>
<!--
Load model-viewer
-->
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
</head>

<body>
Expand Down
44 changes: 36 additions & 8 deletions scripts/bootstrap-contracts-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { MichelsonMap, TezosToolkit } from '@taquito/taquito';
import { InMemorySigner } from '@taquito/signer';
import {
Fa2MultiNftFaucetCode,
FixedPriceSaleMarketTezCode
FixedPriceSaleMarketTezCode,
FixedPriceSaleTezFixedFeeCode
} from '@tqtezos/minter-contracts';

function toHexString(input: string) {
Expand Down Expand Up @@ -161,19 +162,46 @@ async function bootstrap(env: string) {
});

// bootstrap marketplace fixed price (tez)
await bootstrapContract(bootstrappedConfig, toolkit, {
configKey: 'contracts.marketplace.fixedPrice.tez',
contractAlias: 'fixedPriceMarketTez',
contractCode: FixedPriceSaleMarketTezCode.code,
initStorage: () => ({ sales: new MichelsonMap() })
});
const marketplaceFeePercent = config.get("contractOpts.marketplace.fee.percent");
const marketplaceFeeAddress = config.get("contractOpts.marketplace.fee.address");
if (marketplaceFeePercent && marketplaceFeeAddress) {
await bootstrapContract(bootstrappedConfig, toolkit, {
configKey: 'contracts.marketplace.fixedPrice.tez',
contractAlias: 'fixedPriceMarketTez',
contractCode: FixedPriceSaleTezFixedFeeCode.code,
initStorage: () => ({
admin: {
admin: config.get("admin.address"),
paused: false
},
fee: {
fee_address: marketplaceFeeAddress,
fee_percent: marketplaceFeePercent
},
sales: new MichelsonMap()
})
});
} else {
await bootstrapContract(bootstrappedConfig, toolkit, {
configKey: 'contracts.marketplace.fixedPrice.tez',
contractAlias: 'fixedPriceMarketTez',
contractCode: FixedPriceSaleMarketTezCode.code,
initStorage: () => ({
admin: {
admin: config.get("admin.address"),
paused: false
},
sales: new MichelsonMap()
})
});
}
}

async function main() {
console.log(process.argv[2]);
const envArg = process.argv[2];
let env;
if (['mainnet', 'testnet', 'sandbox'].includes(envArg)) {
if (['mainnet', 'testnet', 'custom', 'sandbox'].includes(envArg)) {
env = envArg;
} else {
env = readEnv();
Expand Down
Loading

0 comments on commit a827743

Please sign in to comment.