BitDegree Scholarships is the solution that enables tracking how contributions made by sponsors are used in real-time. Moreover, it enables programmatic giving – sponsors can define rules for their contributions (i.e. geography, demographic data, learning subjects, incentives) and control the implementation as it happens. Sponsors’ user experience is similar to that of advertisers running Google ad campaigns. Read more...
If you have any questions ar would like to partner with us, drop us a message at hello [at] bitdegree.org
- You must have:
- Ethereum wallet. You can get one here
- OpenCerts.io certificate store
- Login to your wallet using MetaMask extension
- Deploy a new instance
- This is your certificate store address
- Unsigned OpenCerts certificate in form of this schema
- MySql table
certificates
with following columns:- text
certificate
which stores unsigned OpenCerts certificates - text
signed_certificate
to store signed OpenCerts certificate - string
merkle_root
to store blockchain certificate hash
- text
ERC20 TYPE TOKEN
smart contract address (we are using BDG TOKEN smart contract0x1961b3331969ed52770751fc718ef530838b6dee
)- register to ETHEREUM PROVIDER
- create new project
- endpoint in
keys
section will be your provider. Select one fromMAINNET
orROPSTEN
providers
- truffle for building contracts
- Clone this repository
- Run
npm install
command - Run
truffle compile
to compile contracts - Manualy deploy
AlumniStoreContract
using MyEtherWallet - Follow these steps:
- Press Contract section in MyEtherWallet interface
- Deploy contract
- Copy "bytecode" field value from
./contract-storage/build/contracts/AlumniStoreContract.json
- Copy "abi" field value from
./contract-storage/build/contracts/AlumniStoreContract.json
- Sign transaction
- Copy "bytecode" field value from
- Deploy contract
- in order to sign unsigned OpenCerts certificate you have to run
node sign-certificate.js [host] [user] [password] [database] [unsigned certificate ID]
- if you are working on ROPSTEN network only you must define a parameter in
var transaction = new Tx(rawTransaction, {'chain':'ropsten'});
- there is no need to do that on
MAIN
ethereum network
- before issuing a blockchain certificate it has to be signed. Run
node certificate-issue.js [provider] [your_wallet_address] [your_wallet_address_private_key] [certificate_store_address] [merkle_root from your signed certificate]
- if you are working on ROPSTEN network only you must define a parameter in
var transaction = new Tx(rawTransaction, {'chain':'ropsten'});
- there is no need to do that on
MAIN
ethereum network
- You have already deployed your
AlumniStoreContract
in previous step which stores each added student's wallet address andblockchainCertificateHash
(merkle_root field from your signed certificate) - In order to add a new student to your AlumniStoreContract you have to run
node add-student.js [provider] [your_wallet_address] [your_wallet_address_private_key] [alumni_store_contract_address] [signed_certificate_merkle_root] [student_wallet_address]
- if you are working on ROPSTEN network only you must define a parameter in
var transaction = new Tx(rawTransaction, {'chain':'ropsten'});
- there is no need to do that on
MAIN
ethereum network
- scholarship smart contract is a contract which stores a scholarship tokens.
- to deploy this smart contract run
node deploy-contract.js [provider] [your_wallet_address] [your_wallet_address_private_key] [openCertsStoreAddress] [alumniStoreAddress] [tokenContractAddress]
- if you are working on ROPSTEN network only you must define a parameter in
var transaction = new Tx(rawTransaction, {'chain':'ropsten'});
- there is no need to do that on
MAIN
ethereum network
- before you start this step you must have some
ERC20 TYPE TOKENS
- each scholarship contract is developed to store
ERC20 TYPE TOKENS
- to fund scholarship run
node send-funds.js [provider] [your_wallet_address] [your_wallet_address_private_key] [token_amount_to_send] [scholarship_contract_address] [token_contract_address]
- if you are working on ROPSTEN network only you must define a parameter in
var transaction = new Tx(rawTransaction, {'chain':'ropsten'});
- there is no need to do that on
MAIN
ethereum network
- in order to transfer tokens from scholarship contract to students wallet you have to run
node unlock-scholarship.js [provider] [your_wallet_address] [your_wallet_address_private_key] [scholarship_contract_address] [signed_certificate_merkle_root]
- if defined merkle_root is from issued certificate funds from a contract will be transferred to student
- if you are working on ROPSTEN network only you must define a parameter in
var transaction = new Tx(rawTransaction, {'chain':'ropsten'});
- there is no need to do that on
MAIN
ethereum network