Skip to content

Commit

Permalink
Merge pull request #2 from bnb-chain/v2
Browse files Browse the repository at this point in the history
upgrade to 1.7
  • Loading branch information
ybgbob authored May 30, 2024
2 parents 8e0a72d + 5b41aa4 commit 8e59d5b
Show file tree
Hide file tree
Showing 195 changed files with 31,401 additions and 21,351 deletions.
33 changes: 8 additions & 25 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,40 +1,23 @@
# `TESTNET` or `MAINNET`
REACT_APP_NET_ENV=TESTNET

# BANNNER
REACT_APP_BANNER_IDS="22, 23, 13, 16, 6"

PUBLIC_URL=

GENERATE_SOURCEMAP=false

REACT_APP_GF_EXPLORER_URL=https://greenfieldscan.com/
REACT_APP_BSC_EXPLORER_URL=https://testnet.opbnbscan.com/
REACT_APP_DCELLAR_URL=https://dcellar.io/
REACT_APP_GF_EXPLORER_URL=https://testnet.greenfieldscan.com/
REACT_APP_BSC_EXPLORER_URL=https://testnet.bscscan.com/
REACT_APP_DCELLAR_URL=https://testnet.dcellar.io/

REACT_APP_GF_CHAIN_ID=5600
REACT_APP_GF_RPC_URL=https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org
REACT_APP_BSC_RPC_URL=https://opbnb-testnet-rpc.bnbchain.org
REACT_APP_BSC_CHAIN_ID=5611

REACT_APP_MARKETPLACE_CONTRACT_ADDRESS =0xbDc835828B140d1F36315f70575a8a057506ECC4
REACT_APP_GROUP_HUB_CONTRACT_ADDRESS =0xe53725ac14bD77fA4754fC5a09889135C2c7Bc25
REACT_APP_MULTI_CALL_CONTRACT_ADDRESS =0xB3C3c8434BCaD4171F86426C2AFBf5A9c0590Be2
REACT_APP_ERC1155_TRANSFER_CONTRACT_ADDRESS =0x5116a3255C33029756013B6a0d1690775413EE6D
REACT_APP_ERC721_TRANSFER_CONTRACT_ADDRESS =0x8C74F8e6cD4DCb307d344F358683594A68d66CD9
REACT_APP_NEW_MARKETPLACE_CONTRACT_ADDRESS=0xf1a52C24DD202C74fB91fD3F7F2B24748f959b9F

REACT_APP_NETWORK=Testnet

G_TAG=
REACT_APP_DAPP_NAME=mindt0527

REACT_APP_API_DOMAIN=

REACT_APP_CROSS_CHAIN_FEE=0.000001
REACT_APP_INITIATE_LIST_FEE=0.00003

REACT_APP_LIST_FEE_ON_GF=0.0000036
REACT_APP_LIST_ESTIMATE_FEE_ON_BSC=0.0000036
G_TAG=

REACT_APP_BSC_SEND_GAS_FEE=10000000000
REACT_APP_API_DOMAIN=https://api-testnet-marketplace.mindpress.io/v1/

REACT_APP_DAPP_NAME=
REACT_APP_UPLOAD_OBJECT_FEE=0.000012
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir : __dirname,
tsconfigRootDir : __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
Expand All @@ -16,7 +16,7 @@ module.exports = {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
ignorePatterns: ['.eslintrc.js', '__tests__', 'jest.config.mjs'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/mainnet-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ jobs:
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'

- uses: ./.github/actions/ci-setup

- name: Build React App
env:
REACT_APP_NET_ENV: MAINNET
REACT_APP_BANNER_IDS: ""
PUBLIC_URL: https://marketplace.mindpress.io
GENERATE_SOURCEMAP: false
REACT_APP_GF_EXPLORER_URL: https://greenfieldscan.com/
Expand All @@ -40,22 +39,13 @@ jobs:

REACT_APP_GF_CHAIN_ID: 1017
REACT_APP_GF_RPC_URL: https://greenfield-chain.bnbchain.org:443
REACT_APP_BSC_RPC_URL: https://bsc-dataseed1.binance.org
REACT_APP_BSC_CHAIN_ID: 56
REACT_APP_MARKETPLACE_CONTRACT_ADDRESS: "0x1FdBF1726Cf853Cc340e68bae68Dc6a5b6301DeE"
REACT_APP_GROUP_HUB_CONTRACT_ADDRESS: "0xDd9af4573D64324125fCa5Ce13407be79331B7F7"
REACT_APP_MULTI_CALL_CONTRACT_ADDRESS: "0xcA11bde05977b3631167028862bE2a173976CA11"
REACT_APP_ERC1155_TRANSFER_CONTRACT_ADDRESS: "0xAb73f243Be4d0fC5644c822351eC77e85DC2B5Ea"
REACT_APP_ERC721_TRANSFER_CONTRACT_ADDRESS: "0x943FAC6CEBE6e45CE59bA911E5B6447c1a991450"
REACT_APP_NEW_MARKETPLACE_CONTRACT_ADDRESS: 0xf1a52C24DD202C74fB91fD3F7F2B24748f959b9F
REACT_APP_NETWORK: Mainnet
REACT_APP_DAPP_NAME: mindv05
# REACT_APP_DAPP_NAME: mindv05
REACT_APP_DAPP_NAME: mindt0527
G_TAG: G-VRYHWMVQ50
REACT_APP_API_DOMAIN: https://api-marketplace.mindpress.io/v1/
REACT_APP_CROSS_CHAIN_FEE: 0.000001
REACT_APP_INITIATE_LIST_FEE: 0.00003
REACT_APP_LIST_FEE_ON_GF: 0.0000036
REACT_APP_LIST_ESTIMATE_FEE_ON_BSC: 0.0000036
REACT_APP_BSC_SEND_GAS_FEE: 10000000000
REACT_APP_UPLOAD_OBJECT_FEE: 0.000012
run: |
pnpm run build
Expand All @@ -67,7 +57,7 @@ jobs:
--label "org.opencontainers.image.version=$(git describe --tags --abbrev=0)" \
--label "org.opencontainers.image.licenses=AGPL-3.0" \
-f ./Dockerfile -t "${IMAGE_NAME}"
- name: Login to GHCR
uses: docker/login-action@v2
with:
Expand Down
23 changes: 6 additions & 17 deletions .github/workflows/testnet-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,26 @@ jobs:
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'

- uses: ./.github/actions/ci-setup

- name: Build React App
env:
REACT_APP_NET_ENV: TESTNET
REACT_APP_BANNER_IDS: "22,23,13,16,6"
PUBLIC_URL: https://testnet-marketplace.mindpress.io
GENERATE_SOURCEMAP: false
REACT_APP_GF_EXPLORER_URL: https://testnet.greenfieldscan.com/
REACT_APP_BSC_EXPLORER_URL: https://testnet.opbnbscan.com/
REACT_APP_BSC_EXPLORER_URL: https://testnet.bscscan.com/
REACT_APP_DCELLAR_URL: https://testnet.dcellar.io/

REACT_APP_GF_CHAIN_ID: 5600
REACT_APP_GF_RPC_URL: https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org
REACT_APP_BSC_RPC_URL: https://opbnb-testnet-rpc.bnbchain.org
REACT_APP_BSC_CHAIN_ID: 5611
REACT_APP_MARKETPLACE_CONTRACT_ADDRESS: "0xbDc835828B140d1F36315f70575a8a057506ECC4"
REACT_APP_GROUP_HUB_CONTRACT_ADDRESS: "0xe53725ac14bD77fA4754fC5a09889135C2c7Bc25"
REACT_APP_MULTI_CALL_CONTRACT_ADDRESS: "0xB3C3c8434BCaD4171F86426C2AFBf5A9c0590Be2"
REACT_APP_ERC1155_TRANSFER_CONTRACT_ADDRESS: "0x5116a3255C33029756013B6a0d1690775413EE6D"
REACT_APP_ERC721_TRANSFER_CONTRACT_ADDRESS: "0x8C74F8e6cD4DCb307d344F358683594A68d66CD9"
REACT_APP_NEW_MARKETPLACE_CONTRACT_ADDRESS: 0xf1a52C24DD202C74fB91fD3F7F2B24748f959b9F
REACT_APP_NETWORK: Testnet
REACT_APP_DAPP_NAME: mindt0125
REACT_APP_DAPP_NAME: mindt0527
G_TAG: G-SHLTDD3YG4
REACT_APP_API_DOMAIN: https://api-testnet-marketplace.mindpress.io/v1/
REACT_APP_CROSS_CHAIN_FEE: 0.000001
REACT_APP_INITIATE_LIST_FEE: 0.00003
REACT_APP_LIST_FEE_ON_GF: 0.0000036
REACT_APP_LIST_ESTIMATE_FEE_ON_BSC: 0.0000036
REACT_APP_BSC_SEND_GAS_FEE: 10000000000
REACT_APP_UPLOAD_OBJECT_FEE: 0.000012
run: |
pnpm run build
Expand All @@ -67,7 +56,7 @@ jobs:
--label "org.opencontainers.image.version=$(git describe --tags --abbrev=0)" \
--label "org.opencontainers.image.licenses=AGPL-3.0" \
-f ./Dockerfile -t "${IMAGE_NAME}"
- name: Login to GHCR
uses: docker/login-action@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

__tests__
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@
"tracemove",
"verfiy",
"vout"
]
],
"typescript.tsdk": "node_modules/typescript/lib"
}
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ MindPress Data Marketplace is a data exchange platform where users can freely up
Clone the project and install dependencies:

```bash
> git clone https://github.com/bnb-chain/greenfield-data-marketplace-frontend.git
> cd greenfield-data-marketplace-frontend
> git clone git@github.com:bnb-chain/mindpress-marketplace.git
> cd mindpress-marketplace
> pnpm install
> cp .env.example .env.development.local
```
Expand All @@ -29,12 +29,6 @@ abd then run example:
> pnpm run start
```

if you want to add dependency:

```bash
> pnpm i react
```

### Publish the project

publish to production environment:
Expand Down
3 changes: 3 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,9 @@ module.exports = function (webpackEnv) {
},
},
}),
shouldInlineRuntimeChunk && new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
].filter(Boolean),
// Turn off performance processing because we utilize
// our own hints via the FileSizeReporter
Expand Down
23 changes: 23 additions & 0 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { pathsToModuleNameMapper } from 'ts-jest';

/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
preset: 'ts-jest',
testEnvironment: 'node',
// modulePathIgnorePatterns: ['<rootDir>/src/config.spec.ts'],
moduleNameMapper: {
...pathsToModuleNameMapper({ '@/*': ['./src/*'] }, { prefix: '<rootDir>/' }),
'^(\\.{1,2}/.*)\\.js$': '$1',
},
// transformIgnorePatterns: ['node_modules/(?!(@bnb-chain/greenfield-cosmos-types)/)'],
extensionsToTreatAsEsm: ['.ts'],
transform: {
'^.+\\.ts?$': [
'ts-jest',
{
useESM: true,
},
],
},
// setupFilesAfterEnv: ['<rootDir>/tests/env.ts']
};
Loading

0 comments on commit 8e59d5b

Please sign in to comment.