Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
PROTOCOL_IDENTIFIER=D
NODE_RPC_URL=
NODE_RPC_USER=
NODE_RPC_PASS=
NODE_RPC_URL=http://127.0.0.1:22555
NODE_RPC_USER=rpc_user
NODE_RPC_PASS=rpc_password
TESTNET=false
FEE_PER_KB=500000000
UNSPENT_API=https://unspent.dogeord.io/api/v1/address/unspent/
ORD=https://wonky-ord.dogeord.io/
FEE_PER_KB=50000000
UNSPENT_API=https://unspent.dogeord.io/api/v1/address/unspent/ //optional
ORD=https://wonky-ord-v2.dogeord.io/
WALLET=.wallet.json
SERVER_PORT=3000
5 changes: 5 additions & 0 deletions .wallet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"privkey": "your doge private key goes here",
"address": "your doge address goes here",
"utxos": []
}
14 changes: 14 additions & 0 deletions DUNES.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,17 @@ Malformed dunestones are termed cenotaphs.
Dunes input to a transaction with a cenotaph are burned. Dunes etched in a transaction with a cenotaph are set as unmintable. Mints in a transaction with a cenotaph count towards the mint cap, but the minted dunes are burned.

Cenotaphs are an upgrade mechanism, allowing dunestones to be given new semantics that change how dunes are created and transferred, while not misleading unupgraded clients as to the location of those dunes, as unupgraded clients will see those dunes as having been burned.

### Parent Inscriptions
Dunes can be linked to a "parent" inscription, establishing a hierarchical relationship. This allows Dunes to be associated with other digital assets, such as images or other Dunes.

**How It Works**:
- During etching, you can specify a `parentId` (the inscription ID of the parent, e.g., `e6c6efe91b6084eae2c8a2fd6470d3d0dbfbb342f1b8601904f45be8095058e2i0`).
- The etching transaction spends the parent inscription’s UTXO, embedding the link in the blockchain.
- The etcher must control the parent inscription (i.e., have its private key).

**Use Cases**:
- Associate multiple Dunes with a single parent (e.g., an image inscription).
- Create structured collections of digital assets with parent-child relationships.

**Note**: This feature is optional. Dunes can be etched without a parent if no `parentId` is provided.
158 changes: 148 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ git clone https://github.com/sirduney/dunes-cli.git

download this [zip file](https://github.com/verydogelabs/do20nals/archive/refs/heads/main.zip) and upack in a directory.


Now open your terminal and change to the directory the sources are installed.

```
cd <path to your download / installation>
npm install
cd <path to your download / installation e.g. "C:\Doginals-Main">
npm install audit fix
```

After all dependencies are solved, you can configure the environment:
Expand All @@ -57,8 +58,8 @@ NODE_RPC_URL=http://<ip>:<port>
NODE_RPC_USER=<username>
NODE_RPC_PASS=<password>
TESTNET=false
FEE_PER_KB=500000000
ORD=https://ord.dunesprotocol.com/
FEE_PER_KB=50000000
ORD=https://wonky-ord-v2.dogeord.io/
```

You can get the current fee per kb from [here](https://blockchair.com/).
Expand Down Expand Up @@ -94,17 +95,19 @@ node dunes.js wallet send <address> <amount>
Deploy a dune:

```
node dunes.js deployOpenDune 'RANDOM•DUNE•NAME' <symbol> <limit-per-mint> <decimals> <max-nr-of-mints> <mint-absolute-start-block-height> <mint-absolute-stop-block-height> <mint-relative-start-block-height> <mint-relative-end-block-height> <amount-premined-to-deployer> <opt-in-for-future-protocol-changes> <minting-allowed>
node dunes.js deployOpenDune 'RANDOM•DUNE•NAME' <symbol> <limit-per-mint> <decimals> <max-nr-of-mints> <mint-absolute-start-block-height> <mint-absolute-stop-block-height> <mint-relative-start-block-height> <mint-relative-end-block-height> <amount-premined-to-deployer> <opt-in-for-future-protocol-changes> <minting-allowed> [parentId]
```

Example for a dune that can be minted for 100 blocks, with a limit of 100000000, 8 decimals, no mint limit, symbol R (emojis also work) and premining 1R for the deployer during deployment. The `false` means the dune will not opt-in for future protocol changes. The `true` means mints are open.
**Note**: The `[parentId]` parameter is optional and links the new Dune to a parent inscription by specifying its inscription ID (e.g., `e6c6efe91b6084eae2c8a2fd6470d3d0dbfbb342f1b8601904f45be8095058e2i0`). To use this, the parent inscription’s private key must be in your wallet (`.wallet.json`).

The `null` means that the parameters won't be included, e.g. for not setting a max nr of mints limit. If absolute and relative block heights are defined, the dune minting terms will use the highest defined for start as the starting block height parameter and then lowest defined end as the ending block height.
**Example**:

```
node dunes.js deployOpenDune 'RANDOM•DUNE•NAME' 'R' 100000000 8 null null null null 100 100000000 false true
node dunes.js deployOpenDune 'RANDOM•DUNE•NAME' 'R' 100000000 8 null null null null 100 100000000 false true e6c6efe91b6084eae2c8a2fd6470d3d0dbfbb342f1b8601904f45be8095058e2i0
```

This deploys a Dune named `RANDOM•DUNE•NAME` with symbol `R`, a limit of 100000000 per mint, 8 decimals, and premines 1R (100 atomic units) to the deployer. It’s linked to the parent inscription `e6c6...i0`

Mint a dune:

```
Expand All @@ -129,7 +132,7 @@ Example (this will do 100x mints):
node dunes.js batchMintDune '5088000:50' 100000000 100 DTZSTXecLmSXpRGSfht4tAMyqra1wsL7xb
```

Get the ID from: https://ord.dunesprotocol.com/dunes
Get the ID here from: [Wonky Dogeord](https://wonky-ord-v2.dogeord.io/dunes)

Print the balance of an address:

Expand Down Expand Up @@ -167,6 +170,100 @@ Example:
node dunes.js sendDunesNoProtocol DDjbkNTHPZAq3f6pzApDzP712V1xqSE2Ya 10 WHO•LET•THE•DUNES•OUT
```

### Parent Inscriptions
You can link a new Dune to an existing "parent" inscription (e.g., an image or another Dune) using the optional `[parentId]` parameter in `deployOpenDune`. This creates a hierarchical relationship between digital assets.

**Requirements**:
- The parent inscription’s private key must be in your wallet (`.wallet.json`), as the script spends its UTXO to establish the link.
- The `parentId` must be a valid inscription ID in the format `txid:iN` (e.g., `e6c6efe91b6084eae2c8a2fd6470d3d0dbfbb342f1b8601904f45be8095058e2i0`), where `txid` is the transaction ID and `N` is the output index.

**Why Use It?**:
- Organize related Dunes under a single parent (e.g., linking single or multiple Dunes to an image).
- Build structured collections with parent-child relationships.

**Important Notes**:
- This feature is optional. Dunes can be etched without a parent if no `parentId` is provided.

- This "Requires" the parent’s private key to be accessible in the wallet.

- Ensure that the parent inscription’s private key is accessible in the wallet derived from your MetaMask seed phrase. This is necessary because the transaction will spend the parent UTXO to establish the parent-child relationship
## Pay Terms (New)


### Apply Pay Terms

***You can now **charge a mint price** on your Dune etchings:***

- **priceAmount**
A u128 string of shibes (1 DOGE = 100 000 000 shibes) to charge per mint, or `null` to disable fees.

- **pricePayTo**
A Dogecoin address to receive collected fees, or `null`.

When **both** `priceAmount` and `pricePayTo` are set in the `deployOpenDune` command, your Dune will carry on‑chain pay terms. Minters must pay that fee, and proceeds go straight to the specified address.

**Example with Pay Terms**:

```
node dunes.js deployOpenDune \
'RANDOM•DUNE•NAME' \
'R' \
100000000 \
8 \
null null null null \
100 \
100000000 \
false \
true \
e6c6efe91b6084eae2c8a2fd6470d3d0dbfbb342f1b8601904f45be8095058e2i0 \
5000000 \
DDogeFeeRecipientAddress
```

***Important Notes:***
"apply pay terms” is the Key: it lets you set a mint price (in “shibes”) and specify who gets paid when someone mints a Dune. Previously, we could only open‐mint with limits, caps, and block‑height restrictions, etc.; now we can also monetize it by charging a fee and directing that fee to an address of your choice.
You also refactored the internal broadcast() function’s retryAsync call so it passes the helper directly instead of wrapping it in an extra async lambda:

res = await retryAsync(async () => await makePostRequest(), 10, 30000);
res = await retryAsync(makePostRequest, 10, 30000);
This doesn’t change behavior, it does makes the retry logic a bit cleaner!

Why im Digging this upgrade???
Monetization: Projects can now sustainably fund themselves by charging a shibe‑denominated mint fee.

**Flexibility:**

Since the fee is just another field in the Terms object, it’s fully optional, so if you don’t want a fee, you pass "null" and everything behaves exactly like before.
Such Flexibility!!!

**Backward‑compatible:**

Existing scripts and deployments that never set a price will continue to work unchanged.

**Decentralization & Dogecoin ethics:**

***On‑chain enforcement only:***

All the fee logic happens in your local CLI client and then on‑chain via the same RPC calls and smart‑contract‑style logic Dunes has always used. There’s no off‑chain "Gatekeeper" or "Centralized service" validating payments.

**User choice:**

Anyone can deploy an open mint with or without a fee; you’re not forced to pay if you don’t want to.

**Transparent rules:**

All parameters (limits, heights, offsets, fees, pay‑to address) are encoded in the same public transaction data we’ve always put on Dogecoin.

**No new trust assumptions:**

You still only need to trust the Dogecoin network itself and your own keypair....there’s no additional trusted infrastructure introduced.

*In short, it’s Such a clean, opt‑in extension that preserves the fully decentralized ethos of Dogecoin.*

*Much Innovation, Such Decentralized, So Dunes
Well done Fam! Thanks for the Great Idea* @reallyshadydev https://x.com/reallyshadydev


## FAQ

### I'm getting ECONNREFUSED errors when minting
Expand All @@ -177,6 +274,8 @@ There's a problem with the node connection. Your `dogecoin.conf` file should loo
rpcuser=ape
rpcpassword=zord
rpcport=22555
txindex=1
rpccallip=127.0.0.1
server=1
```

Expand All @@ -185,12 +284,51 @@ Make sure `port` is not set to the same number as `rpcport`. Also make sure `rpc
Your `.env file` should look like:

```
PROTOCOL_IDENTIFIER=D
NODE_RPC_URL=http://127.0.0.1:22555
NODE_RPC_USER=ape
NODE_RPC_PASS=zord
TESTNET=false
FEE_PER_KB=50000000
UNSPENT_API=https://unspent.dogeord.io/api/v1/address/unspent/ //optional
ORD=https://wonky-ord-v2.dogeord.io/
WALLET=.wallet.json
SERVER_PORT=3000
```

### I'm getting "insufficient priority" errors when minting

The miner fee is too low. You can increase it up by putting FEE_PER_KB=300000000 in your .env file or just wait it out. The default is 100000000 but spikes up when demand is high.
***The miner fee is too low. You can increase it up by putting FEE_PER_KB=300000000 in your .env file or just wait it out. The default is 100000000 but spikes up when demand is high.***


# Contributing

If you'd like to contribute or donate to our projects, please donate in Dogecoin. For active contributors its as easy as opening issues, and creating pull requests

Feel free to support with Donations, Send all Dogecoin to the following Contributors:

***You can donate to*** **Duney** ***here:***

"handle": ***"SirDuney"*** "at": [***"@SirDuney"***](https://x.com/sirduney))

**"Đogecoin_address":**


***You can donate to*** **GreatApe** ***here:***

"handle": ***"GreatApe42069"*** "at": [***"@Greatape42069E"***](https://x.com/Greatape42069E)

**"Đogecoin_address":** ***"D9pqzxiiUke5eodEzMmxZAxpFcbvwuM4Hg"***


***You can donate to Apezord here:***

"handle": ***"Apezord"*** "at": [***"@apezord"***](https://x.com/apezord)

**"Đogecoin_address":** ***"DNmrp12LfsVwy2Q2B5bvpQ1HU7zCAczYob"***



<img width="711" height="712" alt="39" src="https://github.com/user-attachments/assets/d9b98228-f065-4cd8-a201-10ce93758af4" />


Loading