-
Download MetaMask browser extension: https://metamask.io/.
-
Open MetaMask in browser and create your wallet.
-
Select
Kovan Test Network
as your blockchain network at the top of the MetaMask window. -
It is necessary to have multiple accounts for different roles in order to test the application. One account is already created. By default it has name
Account 1
. This one will be used for the approving authority role. It is better to assign proper name to it, for exampleAuthority
, which can be done in Account Details view. One more account for tester role is needed which can be created from account menu at the top left corner of the extension view by selectingCreate Account
. The name assigned to it can beTester
. -
Now we need to have some ether to execute transactions on the network. For Kovan test network it can be obtained from the faucets:
where you would need to supply the ethereum address of your account. The
Authority
account address can be taken for this purpose. -
After ether has been transferred to your account, you should be able to see the balance in MetaMask (1 Eth is transferred from the first faucet and 3 Eth can be obtained from the second one).
-
In order to submit transactions from
Tester
account, it has to have some Ether as well. We can transfer Eth fromAuthority
account directly in MetaMask. Be sure thatAuthourity
account is active and then clickSend
, after you have to selectTransfer between my accounts
and selectTester
account. Then you will need to put amount of ether to be transferred, 0.3 Eth should be enough for performing the test. Transaction Fee option can be left as average. ClickNext
and then confirm the transaction. When the new block is mined (after couple of seconds) you should be able to see 0.3 Eth on yourTester
account.
This can be done easily with MetaMask and Remix. Be sure that Authority
account is enabled in MetaMask, since it has more ether to successfully deploy a contract.
- Open https://remix.ethereum.org/ and select Solidity as your environment.
- On the left toolbar open the file Explorer and load TesterRegistry.sol and ImmunityCertificate.sol from contracts folder of this repository.
- Be sure that ImmunityCertificate.sol is opened now and open the Solidity Compiler view on the left toolbar.
- Select ImmunityCertificate as contract to be compile and press compile (TesterRegistry will be compiled as well as it is a dependency). The compiler should return no errors.
- Open Deploy and Run Transactions view from the left toolbar and select Injected Web3 as Environment.
- Select Test Registry contract to be deployed and provide authority address from MetaMask to the contract constructor to the input located on the right side from Deploy button in the following format:
["0x38690D95E783Bc216A8428764a4D4B8f3E5595bf"]
where0x38690D95E783Bc216A8428764a4D4B8f3E5595bf
is the authority address from MetaMask. - Deploy the contract by clicking deploy button and sign the transaction via MetaMask. After the block with transaction is mined the contract should appear in the Deploy and Run Transactions window.
- Select Immunity Certificate contract to be deployed and provide it with the following constructor parameters:
"0x98EBC26814A37148e12eef1C5905Ae1EcB348f8F", "Covid19 Immunity Certificate"
where0x98EBC26814A37148e12eef1C5905Ae1EcB348f8F
is the address of just deployed Registry contract andCovid19 Immunity Certificate
is the description of the certificate contract. - Open
contractAddresses.js
file from this repository and update contract addresses with just deployed ones.
First install dependencies:
yarn install
To run in hot module reloading mode:
yarn start
To create a production build:
yarn build-prod
Open the file dist/index.html
in your browser
- Project boilerplate by createapp.dev
- Check-mark animated SVG adapted from Alexander Haniotis