10-Minute Tutorial
Last updated
Last updated
To complete the integration of kOS into your smart contract and to be able to call transactions within a dApp.
This guide covers the instructions for deploying relevant smart contracts and using the KRNL SDK through KRNL Sandbox.
Choosing a kernel is predefined for simplicity and ease of understanding throughout this easy-to-follow guide.
MetaMask - download MetaMask into your browser here
Etherscan (optional: for verifying smart contracts) - Find the API key here
Sepolia testnet - "Add a custom network" on your MetaMask wallet
Oasis Sapphire testnet - Again, visit "Add a custom network" in your MetaMask wallet. This time, add the network details below (TEST will be used for deploying smart contracts)
Funds - make sure you have a SepoliaETH and Oasis TEST token balance, by claiming them from faucets here.
In this section, we will provide you with 2 options for deploying your smart contracts.
Remix (recommended for beginners, no installation required) Remix offers a web-based interface where users can deploy smart contracts without installing extra software.
Hardhat Hardhat offers a variety of features which allow users to deploy, test, and interact with smart contracts on local network, testnet, or mainnet.
For more detailed information on smart contract deployment, please go here.
Go to the Remix website here.
Note down the "contract address" that is shown in the terminal. This is your "Token Authority smart contract address".
Note the "contract address" that is shown in the terminal. This is your primary "smart contract address".
Etherscan verification (no.6) from the image above will require the Etherscan API key.
If it is your first time verifying smart contract on Etherscan, visit this page to follow steps for getting API key.
Click here to move to the registration section.
For more detailed information on smart contract deployment, please go here.
Wait until the contracts have been deployed and verified successfully. More details can be found in <package.json>
.
Click here to move to the registration section.
Find the full KRNL guide to smart contract registration here.
Read the full KRNL guide to dApp registration here.
The parameter(s) has to be the same as in "Step 2: Fill Your Parameters".
If you are trying to fill different values on "Step 3: Submit Your Transaction", it means that you are trying to tamper with the transaction after already obtaining the response(s) from kernel(s).
Congratulations!
You have successfully deployed your smart contract, which inherits KRNL, to Sepolia testnet.
You have deployed Token Authority, which protects your contract.
You have also made a transaction to your smart contract.
The choice of predefined kernel is Prohibited List kernel (kernel ID: 337).
It acts as another layer of protection to your smart contract by filtering prohibited wallet addresses.
You may refer to How Does kOS Work? step 4.
This kernel will give the response based on your wallet address.
If your wallet address is on this Prohibited List kernel, your smart contract will not allow the transaction.
Want to try making transaction while your wallet address is on Prohibited List kernel?
Feel free to explore our detailed pages for kernel, smart contract, dApp below.