TODO
Clone and initialize the repository:
$ git clone https://github.com/checkdot/CheckDot.InsuranceProtocol.git
$ cd CheckDot.InsuranceProtocol
$ npm i
Compile the project:
$ truffle compile
Deploy CheckDot Smart Contract to interact with CDT locally. Choose a local address of your choice from Ganache and modify the truffle-config.js in module.exports > networks > development > from by writing your selected local address.
const HDWalletProvider = require('@truffle/hdwallet-provider');
var secret = require("./secret");
module.exports = {
plugins: ['solidity-coverage', 'truffle-plugin-verify'],
api_keys: {
bscscan: secret.API_KEY
},
networks: {
development: {
// truffle deploy --network development
host: "127.0.0.1",
port: 7545,
network_id: "*",
from: "0x7f87C43136F7A4c78788bEb8e39EE400328f184a"
},
...
}
And deploy locally
$ truffle deploy
Do the same in your CheckDot InsuranceProtocol Contract local repository. In the migration module replace the contract address with the one you generated deploying your local CheckDot Smart Contract. Deploy the contract:
$ truffle deploy --network development
$ truffle test