Developer Quickstart
With DogeOS, your favorite tools for building and testing smart contracts just work.
Since DogeOS is bytecode equivalent with the EVM, you’ll just need to point your favorite builder tools at a DogeOS RPC Provider.
If you run into any issues, please reach out in our Discord.
Acquiring Dogecoin
DogeOS uses DOGE as its native currency, which will be needed to pay transaction fees for deploying and interacting with the network.
To start building on DogeOS, we suggest you begin with using our DogeOS Testnet. You’ll first need to acquire some testnet DOGE. See the Faucet page for tips on getting test Dogecoin.
For a walkthrough, start with the User Guide’s Setup page.
Network Configuration
DogeOS Testnet
Use the table below to configure your Ethereum tools to the DogeOS Testnet.
Network Name | DogeOS Testnet |
---|---|
RPC URL | https://rpc.devnet.doge.xyz/ |
Chain ID | 221122420 |
Currency Symbol | DOGE |
Block Explorer URL | https://blockscout.devnet.doge.xyz |
Configure your tooling
Hardhat
Modify your Hardhat config file hardhat.config.ts
to point at the DogeOS Testnet public RPC.
...
const config: HardhatUserConfig = { ... networks: { dogeosTestnet: { url: "https://rpc.devnet.doge.xyz/" || "", accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], }, },};
...
Foundry
To deploy using the DogeOS Testnet Public RPC, run:
forge create ... --rpc-url=https://rpc.devnet.doge.xyz/
Truffle
Assuming you already have a Truffle environment setup, go to the Truffle configuration file, truffle.js
. Make sure to have installed HDWalletProvider: npm install @truffle/hdwallet-provider@1.4.0
const HDWalletProvider = require("@truffle/hdwallet-provider")...module.exports = { networks: { dogeosTestnet: { provider: () => new HDWalletProvider(process.env.PRIVATE_KEY, "https://rpc.devnet.doge.xyz/"), network_id: '*', }, }}
Brownie
To add the DogeOS Testnet, run the following command:
brownie networks add Ethereum dogeosTestnet host=https://rpc.devnet.doge.xyz/ chainid=221122420
To set this as your default network, add the following in your project config file:
networks: default: dogeosTestnet
Another way to add the DogeOS Testnet is to create a yaml
file and run a command to add it.
This is an example of a yaml file called network-config.yaml
live:- name: Ethereum networks: - chainid: 221122420 explorer: https://blockscout.devnet.doge.xyz/ host: https://rpc.devnet.doge.xyz id: dogeosTestnet name: DogeOS Testnet
To add the DogeOS Testnet to the network list, run the following command:
brownie networks import ./network-config.yaml
To deploy on DogeOS, run the following command. In this example, token.py
is the script to deploy the smart contract. Replace this with the name of your script:
brownie run token.py --network dogeosTestnet
ethers.js
Setting up a DogeOS Testnet provider in an ethers
script:
import { ethers } from "ethers"
const provider = new ethers.providers.JsonRpcProvider("https://rpc.devnet.doge.xyz/")
scaffold-eth
To deploy using Scaffold-eth, you’ll need to point both your Hardhat and React settings at the DogeOS Testnet.
Configure Hardhat
In the packages/hardhat/hardhat.config.js
file, you’ll add the network and select it as the default network.
...//// Select the network you want to deploy to here://const defaultNetwork = "dogeosTestnet";...module.exports = {... networks: {... dogeosTestnet: { url: "https://rpc.devnet.doge.xyz/", accounts: { mnemonic: mnemonic(), }, }, }...}
Be sure to fund the deployment wallet as well! Run yarn generate
to create the wallet and yarn account
to check its funds. Once funded, run yarn deploy --network dogeosTestnet
to deploy on the DogeOS testnet.
Configure the Frontend
To configure your frontend, you need to add the DogeOS Testnet as a network option, then select it as default.
To add the network, modify packages/react-app/src/constants.js
.
...export const NETWORKS = {... dogeosTestnet: { name: "dogeosTestnet", color: "#e9d0b8", chainId: 221122420, rpcUrl: "https://rpc.devnet.doge.xyz/", blockExplorer: "https://blockscout.devnet.doge.xyz", },...}
Next, in packages/react-app/src/App.jsx
modify
.../// 📡 What chain are your contracts deployed to?const initialNetwork = NETWORKS.dogeosTestnet;...