{"repo":"cashninjas/minting-contract","free":true,"listed":false,"github":"https://github.com/cashninjas/minting-contract","clone":"git clone https://github.com/cashninjas/minting-contract.git","description":"Multi-threaded minting smart contract for Bitcoin Cash.","language":"TypeScript","stars":16,"topics":["bitcoin-cash","bitcoincash","cashtokens","smart-contracts","cashscript"],"license":null,"category":"blockchain-web3","readme_excerpt":"BCH Minting Contract Multi-threaded minting smart contract for the Bitcoin Cash network. The CashScript code for the smart contract is contract/mint.cash and the corresponding artifact contract/mint.json . The repo also includes helper functions to set up a smart contract with minting-setup.ts and to claim payouts with invoke-payout.ts . Contract Design Multi-threaded The contract design is multi-threaded meaning multiple contract UTXOs running in parallel. This set up enables multiple simultaneous mint interactions. Clients can randomly pick one of the threads or an application server can manage idle/active UTXOs. This design also means the mint is not actually sequential, i.e. NFT number 16 can be minted before NFT number 12, depending on how much each of the different threads is used. Practical The minting contract is designed to be practical. For example the smart contract separates the NFT output to the user from their change output to ensure compatibility with different CashTokens wallets. The contract also has a separate payout function instead of having a payout output on each minting transaction, which would create thousands of small payout outputs. Lastly, it burns the minting NFTs when the contract ends, this way there are no inactive minting NFTs remaining at the end of the contract. Optimized & Clean The minting contract is optimized to be minimal in size (the redeem script is only 163 bytes). For example, the tokenId is not included as a contract constructor arg","default_branch":null,"files":null,"tree":[],"storefront":"/r/cashninjas","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cashninjas/minting-contract/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}