A crypto payroll back office built on the internet computer.
- Downloaded and installed Node.js.
- Downloaded and installed Angular.
- Downloaded and installed the DFINITY Canister SDK.
- Downloaded Bitcoin Node
- Remember to stop any Internet Computer or other network process that would create a port conflict on 4943.
-
Start Bitcoin local node
./bin/bitcoind -conf=$(pwd)/bitcoin.conf -datadir=$(pwd)/data --port=18444
-
Start ICP local network
dfx start --clean --background --enable-bitcoin
-
backend
cargo update dfx deploy zbank_payroll_backend
-
bitcoin
dfx deploy zbank_bitcoin --argument '(variant { Regtest })'
-
frontend (We use Angular to build)
dfx generate zbank_bitcoin dfx generate zbank_payroll_backend cd src/canister/frontend npm install dfx canister create zbank_payroll_frontend ng build dfx deploy zbank_payroll_frontend
You can also use
ng serve
to start frontend server without deploy on ICP.
-
mining
./bin/bitcoin-cli -conf=$(pwd)/bitcoin.conf generatetoaddress <number-of-blocks> <address>
-
check mem pool
./bin/bitcoin-cli -conf=$(pwd)/bitcoin.conf getrawmempool
-
Create wallet
./bin/bitcoin-cli -conf=$(pwd)/bitcoin.conf -regtest createwallet "<wallet_name>"
-
Load wallet
./bin/bitcoin-cli -conf=$(pwd)/bitcoin.conf loadwallet "<wallet_name>"
-
Unload wallet
./bin/bitcoin-cli -conf=$(pwd)/bitcoin.conf unloadwallet "<wallet_name>"
-
Get new wallet address
./bin/bitcoin-cli -conf=$(pwd)/bitcoin.conf getnewaddress "<wallet_name>" "legacy"
-
Clear Bitcoin local node
rm -rf data/regtest/
-
Clear ICP local network
rm -rf .dfx
Hint, If you're trying to send a transaction and the transaction isn't being mined, try sending the same transaction via bitcoin-cli.
./bin/bitcoin-cli -conf=$(pwd)/bitcoin.conf sendrawtransaction <tx-in-hex>
- bad-txns-premature-spend-of-coinbase: Coinbase is the inputless transaction created when a new block is mined and given to the miner, and must have 100 confirmations before that reward can be spent.
- Make data persistent (preupgrade and postupgrade)
- Deploy on ICP main network
- Support other networks like ETH, TRON, etc.
- Design business model to cover cycle costs
- Add network fee and platform fee features
- Add IAM(Identity Access Management) and RBAC(role-based access control)
- Unsecured Loan: With transaction data on the payroll back office, we can provide credit rating for companies, and build the next product to link them with investors.