Develop on Sapphire
As Sapphire is EVM-compatible, you can use the same dev tooling as you would when building on Ethereum. Additionally, we build tools to support you in creating secure and confidential dApps.
Feel free to check out the Concepts page to get a better understanding of the transaction flow and the contract state.
Contract Development
Sapphire is programmable using any language that targets the EVM, such as Solidity, Fe or Vyper. If you prefer to use an Ethereum framework like Hardhat or Foundry, you can also use those with Sapphire; all you need to do is set your Web3 gateway URL. You can find the details of the Oasis Sapphire Web3 endpoints on the Network information page.
Features
📄️ Deployment Patterns
Deploying upgradable and deterministic contracts with proxies
📄️ Gasless Transactions
Sign and submit transactions without paying for fees
📄️ Security
Recipes for Confidentiality: Security considerations when writing confidential contracts
📄️ View-Call Authentication
Authenticate users with your confidential contracts
Randomness, Subcalls and More Precompiles in the contracts API reference
Frontend Development
To connect your frontend to your smart contracts, see the Browser chapter.
More Frontend Frameworks
We support the common frontend libraries with the v2 client:
Framework | Package | API Reference | GitHub |
---|---|---|---|
Ethers v6 | @oasisprotocol/sapphire-ethers-v6 | API | GitHub |
Viem | @oasisprotocol/sapphire-viem-v2 | API | GitHub |
Wagmi | @oasisprotocol/sapphire-wagmi-v2 | API | GitHub |
Backend Development
If you want to connect and execute transactions from your backend. Sapphire has three clients in different programming languages:
Language | Package | API Reference | GitHub |
---|---|---|---|
Javascript | @oasisprotocol/sapphire-paratime | API | GitHub |
Go | @oasisprotocol/sapphire-paratime | API | GitHub |
Python | API | GitHub |
Testing
Test confidential contracts with Hardhat or Ethers.
Examples
See our Examples page for demo dApps that bring all the above together.
Tools and Services
📄️ ABI Playground
Interacting with contracts in the browser
📄️ Localnet
A Docker container that simulates a local Sapphire blockchain
📄️ Remix
A guide for the Remix web IDE
📄️ Contract Verification
Verifying deployed contracts
📄️ Band Oracle
A guide to integrate the Band Oracle
Should you have any questions or ideas to share, feel free to reach out to us on discord and other social media channels.