Batch Transactions

Install Loop

Install something like loop so you can run on transaction and that can keep running behind the scenes while you make a sandwich.

Using the NEAR CLI

Log into the account that has the premission needed to execute what you need

near login

Find the Transaction Data Needed

  1. Go on the mintbase UI and find a transaction you want to loop through, let's do Multiply

2. Initiate the transaction, but click "More Information" on the Approve Page.

3. Then click the function name `nft_batch_mint` to reveal the code

Run a Loop on the Command line

  1. Create a local file called mass_mint

  2. Replace the obvious fields formatted like so below


near call nearcon2.mintbase1.near nft_batch_mint "{
\"owner_id\": \"nearcon2.near\",
\"metadata\": {
  \"extra\": \"ticket\",
  \"reference\": \"dfnswq0LaXwNgGzqdW0-YPJLtTxc-fhQlLk8k1UCcJw\"
\"num_to_mint\": 25,
\"royalty_args\": {
\"split_owners\": {
}" --accountId nearcon2.near --gas 280000000000000 --amount 0.00000000000000000000001

3. Then run the loop

loop 'bash' --for-duration 1h --every 5s

Last updated