Git Product home page Git Product logo

dunes-cli's Introduction

Dunes

A minter and protocol for dunes on Dogecoin.

You can find general information about Dunes here.

⚠️⚠️⚠️ Important ⚠️⚠️⚠️

Use this wallet for dunes only! Always mint from this wallet to a different address. This wallet is not meant for storing funds or dunes.

Prerequisites

To use this, you'll need to use your console/terminal and install Node.js on your computer. So please ensure, that you have your

Install NodeJS

Please head over to https://nodejs.org/en/download and follow the installation instructions.

Launch your own RPC

In order to inscribe, you will need to have access to a Dogecoin RPC. For example: https://getblock.io/ provides a service to get access to an RPC. You will need that for the configuration.

Setup

git clone and install

Install by git clone (requires git and node on your computer)

git clone

git clone https://github.com/sirduney/dunes-cli.git

or

download this zip file 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

After all dependencies are solved, you can configure the environment:

Configure environment

Copy a .env.example to .env and add your node information. Here are also some recommended settings:

PROTOCOL_IDENTIFIER=D
NODE_RPC_URL=http://<ip>:<port>
# This is optional if you have an RPC from getblock.io
NODE_RPC_USER=<username>
NODE_RPC_PASS=<password>
TESTNET=false
FEE_PER_KB=500000000
UNSPENT_API=https://unspent.dogeord.io/api/v1/address/unspent/
ORD=https://wonky-ord.dogeord.io/

You can get the current fee per kb from here.

Funding

Generate a new .wallet.json file:

node dunes.js wallet new

Then send DOGE to the address displayed. Once sent, sync your wallet:

node dunes.js wallet sync

If you are minting a lot, you can split up your UTXOs:

node dunes.js wallet split <splits>

When you are done minting, send the funds back:

node dunes.js wallet send <address> <amount>

Dunes

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>

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.

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.

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

Mint a dune:

node dunes.js mintDune <id> <amount> <to>

Example:

node dunes.js mintDune '5088000:50' 100000000 DTZSTXecLmSXpRGSfht4tAMyqra1wsL7xb

Mass mint a dune:

node dunes.js batchMintDune <id> <amount> <number-of-mints> <to>

Example (this will do 100x mints):

node dunes.js batchMintDune '5088000:50' 100000000 100 DTZSTXecLmSXpRGSfht4tAMyqra1wsL7xb

Get the ID from: https://ord.dunesprotocol.com/dunes

Print the balance of an address:

node dunes.js printDuneBalance <dune-name> <address>

Example:

node dunes.js printDuneBalance WHO•LET•THE•DUNES•OUT DTZSTXecLmSXpRGSfht4tAMyqra1wsL7xb

Split dunes from one output to many:

node dunes.js sendDuneMulti <txhash> <vout> <dune> <decimals> <amounts> <addresses>

Example:

node dunes.js sendDuneMulti 15a0d646c03e52c3bf66d67c910caa9aa30e40ecf27f495f1b9c307a4ac09c2e 1 WHO•LET•THE•DUNES•OUT 8 2,3 DDjbkNTHPZAq3f6pzApDzP712V1xqSE2Ya,DTnBdk1evnpbKe1qeCoeATHZnAVtwNR2xe

Combine dunes from multiple outputs to one:

node dunes.js sendDunesNoProtocol <address> <utxo-amount> <dune>

Example:

node dunes.js sendDunesNoProtocol DDjbkNTHPZAq3f6pzApDzP712V1xqSE2Ya 10 WHO•LET•THE•DUNES•OUT

FAQ

I'm getting ECONNREFUSED errors when minting

There's a problem with the node connection. Your dogecoin.conf file should look something like:

rpcuser=ape
rpcpassword=zord
rpcport=22555
server=1

Make sure port is not set to the same number as rpcport. Also make sure rpcauth is not set.

Your .env file should look like:

NODE_RPC_URL=http://127.0.0.1:22555
NODE_RPC_USER=ape
NODE_RPC_PASS=zord
TESTNET=false

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.

dunes-cli's People

Contributors

lambodoge avatar sirduney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dunes-cli's Issues

Fails to check tx size

Broadcasting split tx
Error executing operation: Request failed with status code 500

Error is really {"result":null,"error":{"code":-26,"message":"64: tx-size"},"id":0}. There were nearly 1,000 utxos in the funding wallet, and the command was 'node dunes.js batchMintDune [...] 1000 [...]'

send dunes failed

hi, i have successfully sent first 10 dunes to another wallet , but at the second try , the process failed , after many try , same fail message ( wallet balance 566 dunes ) :

node dunes.js sendDunesNoProtocol D9exgUbU2mLd219ga34iW5doeey6aBnUCq 50 DUNES•ARE•SANDY
✔ Transferring 50 utxos of DUNES•ARE•SANDY. Are you sure you want to proceed? … yes

Error executing operation: Request failed with status code 500
Retrying operation in 30000 ms...
Error executing operation: Request failed with status code 500
Max retries exceeded (0), aborting operation.
Fetching unspent outputs for page 1...
Fetching unspent outputs for page 2...
Fetching unspent outputs for page 3...
Fetching unspent outputs for page 4...
Fetching unspent outputs for page 5...
Fetching unspent outputs for page 6...
Fetching unspent outputs for page 7...
Fetching unspent outputs for page 8...
Fetching unspent outputs for page 9...
Fetching unspent outputs for page 10...
Fetching unspent outputs for page 11...
Fetching unspent outputs for page 12...
Fetching unspent outputs for page 13...
balance 1148125000
ReferenceError: Cannot access 'wallet' before initialization
at broadcast (/home/momo/dunes-new/dunes21/dunes.js:1369:55)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async walletSendDunesNoProtocol (/home/momo/dunes-new/dunes21/dunes.js:746:15)
at async Command. (/home/momo/dunes-new/dunes21/dunes.js:588:7)

Wallet fragmented by all the 1.5 doge outputs

Each single mint produced by 'node dunes.js mintDune' also produces a 1.5 doge change output, until the wallet is totally fragmented. Due to another bug, dunes-cli doesn't even work on such a fragmented wallet, so the whole thing then stops working.

https://github.com/sirduney/dunes-cli/blob/master/dunes.js#L907 says

the total doge we need per mint is the fee, the output and a safety buffer of 1.5 doge so that the change is not taken as fee

But there seems to be a 2 tx process, so in the second stage there doesn't need to be any change, therefore this reason doesn't apply.

If anyone finds wallet software that works for recombining all these utxos, there will be a high fee for listing them all in the tx. It also spams the blockchain with unneeded 1.5 doge outputs, and attempts to recombine them.

It should display real error message

eg it says
Broadcasting split tx
Error executing operation: Request failed with status code 500

Using wireshark or tshark shows the real error was {"result":null,"error":{"code":-26,"message":"64: tx-size"},"id":0}

For local node use interface 'lo', for remote node use appropriate interface, eg in linux bash as root:
tshark -i lo -f "port 22555" -c 200000
tail -f /var/tmp/wireshark_lo*.pcapng | grep -a error

why ım getting this issue What should I do? Do I need to install dogecoin core?

node dunes.js wallet new
C:\Users\samsung\Desktop\doge\dunes-cli\dunes.js:297
for (let i = 0; i < inputString.length; i++) {
^

TypeError: Cannot read properties of undefined (reading 'length')
at stringToCharCodes (C:\Users\samsung\Desktop\doge\dunes-cli\dunes.js:297:35)
at Object. (C:\Users\samsung\Desktop\doge\dunes-cli\dunes.js:35:20)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49

Node.js v20.10.0

It should cycle the utxos in .wallet.json

After eg 'node dunes.js batchMintDune 100000000 23

' (which does not cause too-long-mempool-chain), if you run it again, it uses the same large funding utxo (at least it does if you delete the 1.5 doge thing (#3)). So it gets stuck for a while with too-long-mempool-chain. So at the end of batchMintDune it should move the 1st utxo in .wallet.json to the end of the file.

Error 500 unable to mint dunes

Good day,

I am getting an error 500 every time I want to mint Dunes.
Before it was working quite well but since all week-end I was unable to mint.

Can you help?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.