Terminal Window 1: Install Node Version Manager (NVM) and run the following:
nvm install v10.16.0 &&
nvm use v10.16.0 &&
yarn install &&
yarn run generate:typedefs &&
yarn run check:code &&
yarn run premigrate &&
npm install -g truffle ganache-cli
Terminal Window 2: Open a second terminal tab and run the following to start Ganache CLI
ganache-cli \
--account="0x209c205f333b5a65cc428589a51bd9f2621e2fc01de1b02dbf8c0f0b68e4974e, 50471238800000000000" \
--account="0x0edb559026c8f779be17b4c9d8e4dfc14bead6592241de4d6612f77769327f7f, 100471238800000000000" \
--unlock "0x209c205f333b5a65cc428589a51bd9f2621e2fc01de1b02dbf8c0f0b68e4974e" \
--unlock "0x0edb559026c8f779be17b4c9d8e4dfc14bead6592241de4d6612f77769327f7f" \
--port 8545 \
--hostname localhost \
--seed '0x209c205f333b5a65cc428589a51bd9f2621e2fc01de1b02dbf8c0f0b68e4974e' \
--debug true \
--mem true \
--mnemonic 'end sleep vote expire arctic magic crack wrap toddler lizard acoustic owner' \
--db './db/chain_database' \
--verbose \
--networkId=3 \
--gasLimit=7984452 \
--gasPrice=20000000000;
Terminal N/A: Modify tsconfig.js file as follows so TypeScript compiles without error:
- Change value of
isolatedModules
tofalse
- Change to
allowJs
value tofalse
Terminal N/A: Modify truffle.js by changing the body of development: { ... }
to instead be:
development: {
accounts: 5,
blockTime: 3,
defaultEtherBalance: 500,
host: "localhost",
port: 8545,
// `default` - Catch-all
// `*` - Match any network id
network_id: "*",
networkCheckTimeout: "10000",
websockets: true
},
Terminal 1: Run the following:
truffle migrate --reset --network development
Terminal 1: Run the following to build the code:
yarn run build &&
yarn run postbuild
Note: When you run yarn run build
it sets compilerOptions.isolatedModules back to
true (implementation limitation)
, but we had to disable it to migrate it to the development network,
just ignore this.
Terminal N/A: Run local server for website
yarn global add serve &&
serve -s build
Terminal N/A: Go to http://localhost:5000 and unlock Metamask by entering your password.
By default it might be using Mainnet and you may see your MXC token account balance.
We want to be using our local Ethereum Development chain on localhost:8545, so open MetaMask,
click where it says "Main Ethereum Network" (top middle of UI) and instead choose "Local Network 8545"
Then we want to import the account that created the MXCToken on the chain with private keys (view the logs when you ran truffle migrate...
):
- 0xce31EeD26ff009f1F5e38408571ea174c5d54f20 (~50 Testnet ETH) Click the MetaMask Menu icon (top right of UI), choose Import Private Key > Import, select "Private Key" from selection box, and paste one of the above private keys, and then click "Import". In the AXS Wallet UI it will now show a balance of ~50 Testnet ETH
Import the MXCToken into MetaMask so it shows the account balance in MXC. Menu icon (on left) > Add Token > Custom Token > Token Contract Address > then enter the contract address it was deployed to (i.e. 0x4c6B3e63DbD2933cf0FB820F8C07270a6f3311CE), and it'll pre-populate with the MXC details, then click "Next".
Adding steps to initially install nvm/yarn and dependencies on ubuntu 18 which may be used to create a Docker based process.
Logout and back in to refresh the environmental variables
Clone the project and start from top on this page
git clone https://github.com/mxc-foundation/mxc-wallet.git
cd mxc-wallet/
If you face an issue with 'serve -s build' command not found try adding yarn upfront