@wombat-exchange/configx
v1.0.11
Published
This package is used to pre-build some configs (e.g. asset) in Wombat dapp.
Downloads
72
Readme
@wombat-exchange/configx
This package is used to pre-build some configs (e.g. asset) in Wombat dapp.
Publish to NPM
Please use it locally before publish to NPM.
Login NPM: npm adduser / npm login
Publish latest version : npm publish
Testing
Uncomment main() in src/index.ts
Example config will generated at src/example/generatedConfig
// uncomment it for testing purpose
//main()
$ yarn start:dev
Use it to frontend repo locally
To install and set up the library locally
Full path example: etc. .../wombat-exchange-configx-v1.0.7.tgz
Pump verison in package.json before pack.
$ yarn build
$ yarn pack
$ yarn add <FULL_PATH>
Installation
To install and set up the library, run:
$ yarn add @wombat-exchange/configx
Use
- Create a configx.js
module.exports = {
masterWombat: {
address: {
56: '0x489833311676B566f888119c29bd997Dc6C95830',
42161: '0x62A83C6791A3d7950D823BB71a38e47252b6b6F4',
97: '0x8C0e9334DBFAC1b9184bC01Ef638BA705cc13EaF',
80001: '0x231e03Ee5Fc8220ca583e7fb44851e7C51a949F0',
1: '0xC9bFC3eFeFe4CF96877009F75a61F5c1937e5d1a',
534351: '0x01722147c9502ECCbd68bB328A47A080C13D8108',
10: '0x82E62f4e174E3C5e1641Df670c91Ac6Ab8541518',
1351057110: '0x2c5bdB54A5A2C899D7a8BAA091EEcd0bCB2Bdd31',
534352: '0xbc007EEA00EA4b240E803A7dD39026554fBbA64a',
8453: '0x6521a549834F5E6d253CD2e5F4fbe4048f86cd7b',
43114: '0x6521a549834F5E6d253CD2e5F4fbe4048f86cd7b',
137: '0xE85f625404eef8a55D9A8B385777d7C8E45E0C73',
},
},
rpcs: {
56: [],
42161: [],
97: [],
80001: [],
1: [],
534351: [],
10: [],
1351057110: [],
534352: [],
8453: [],
43114: [],
137: [],
},
}
- Add a script below to package.json
"postinstall": "configx"
- run:
$ yarn postinstall or yarn install