New Dfinance PegZone implementation.
Based on Althea Peggy.
- Nodejs ~10.16.2
- Truffle ~5.1.33
- Ganache-cli ~6.9.1 (for testing)
Configure truffle-config.js
(see configuration manual).
Compile contracts:
npm run compile
Compile contracts:
npm run compile
Run tests:
npm test
Copy and configure .env
:
cp .env.example .env
Migrate contracts:
PEGGY=true truffle migrate
To deploy XFI mockup contract:
XFI_MOCK=true CREATOR_ADDRESS=... truffle migrate
New minted XFI will be deposited on creator address.
To run migration for a specific network, make sure that the network is configured in your truffle-config.js
and specify the --network
option, like below:
truffle migrate --network live
Configure .env
, see Send XFI to peggy contract
section.
During configuration use private key from account deployed/contains XFI.
Run script:
npm run send <dfinance address> <amount>
# Example:
npm run send wallet12yygs09pnyw8uz2x75w4a53fq80gx5xaek3r5m 101000