elven-tools
Advanced tools
Comparing version 1.14.3 to 1.15.0
#!/usr/bin/env node | ||
var Eo=Object.defineProperty;var Ee=Object.getOwnPropertySymbols;var Co=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable;var Ce=(n,e,t)=>e in n?Eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,C=(n,e)=>{for(var t in e||(e={}))Co.call(e,t)&&Ce(n,t,e[t]);if(Ee)for(var t of Ee(e))Ro.call(e,t)&&Ce(n,t,e[t]);return n};var d=(n,e,t)=>new Promise((s,o)=>{var a=l=>{try{c(t.next(l))}catch(g){o(g)}},i=l=>{try{c(t.throw(l))}catch(g){o(g)}},c=l=>l.done?s(l.value):Promise.resolve(l.value).then(a,i);c((t=t.apply(n,e)).next())});import{exit as Oe,argv as ti}from"process";import{exit as Pe}from"process";import{unlinkSync as sa}from"fs";import oa from"ora";import aa from"prompts";import{cosmiconfigSync as jo}from"cosmiconfig";import{cwd as $o}from"process";var Z={name:"elven-tools",engines:{node:"^12.20.0 || ^14.13.1 || >=16.0.0"},type:"module",types:"build/types",version:"1.14.3",elvenTools:{smartContractVersionTagName:"v1.8.0",minterDappVersionTagName:"v3.1.1"},description:"Interacting with custom NFT related Smart Contracts on the Elrond blockchain",main:"build/index.js",bin:{"elven-tools":"./build/index.js"},scripts:{generate:"npm run build && node build/index.js",build:"rimraf build && node ./esbuild.config.js && tsc","dev:lint":"eslint src/** --fix","dev:prettier":"prettier --write 'src/**/*.{js,ts,json}'",prepublishOnly:"npm run build"},author:"Julian \u0106wirko <julian.io>",license:"MIT",homepage:"https://github.com/ElvenTools/elven-tools-cli",repository:{type:"git",url:"https://github.com/ElvenTools/elven-tools-cli"},keywords:["elrond","blockchain","sdk","javascript","nft","cli"],devDependencies:{"@types/cross-spawn":"^6.0.2","@types/download":"8.0.1","@types/ledgerhq__hw-transport":"^4.21.4","@types/node":"^18.6.4","@types/prompt":"^1.1.2","@types/prompts":"^2.0.14","@typescript-eslint/eslint-plugin":"^5.32.0","@typescript-eslint/parser":"^5.32.0",esbuild:"^0.14.53",eslint:"^8.21.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1",prettier:"^2.7.1",rimraf:"^3.0.2",typescript:"^4.7.4"},dependencies:{"@elrondnetwork/erdjs":"11.0.0","@elrondnetwork/erdjs-network-providers":"1.0.0","@elrondnetwork/erdjs-walletcore":"2.0.0",axios:"^0.27.2","bignumber.js":"9.0.2",cosmiconfig:"^7.0.1","cross-fetch":"^3.1.5","cross-spawn":"7.0.3",download:"github:XhmikosR/download#dev",ora:"6.1.2","p-throttle":"5.0.0",prompts:"^2.4.2"}};var Bo="elventools",Go=jo(Bo),r=Go.search($o()),Re,u=((Re=r==null?void 0:r.config)==null?void 0:Re.chain)||"devnet",Ie,je,Xn=(je=(Ie=r==null?void 0:r.config)==null?void 0:Ie.nftMinterSc)==null?void 0:je.deployNftMinterSC,$e,Be,er=((Be=($e=r==null?void 0:r.config)==null?void 0:$e.nftMinterSc)==null?void 0:Be.deployGasLimit)||12e7,Ge,Ue,tr=((Ue=(Ge=r==null?void 0:r.config)==null?void 0:Ge.nftMinterSc)==null?void 0:Ue.version)||Z.elvenTools.smartContractVersionTagName,Qe,qe,nr=((qe=(Qe=r==null?void 0:r.config)==null?void 0:Qe.nftMinterSc)==null?void 0:qe.issueCollectionTokenGasLimit)||8e7,Ye,Ke,rr=((Ke=(Ye=r==null?void 0:r.config)==null?void 0:Ye.nftMinterSc)==null?void 0:Ke.issueValue)||.05,Je,Ve,sr=((Ve=(Je=r==null?void 0:r.config)==null?void 0:Je.nftMinterSc)==null?void 0:Ve.assignRolesGasLimit)||8e7,He,ze,or=((ze=(He=r==null?void 0:r.config)==null?void 0:He.nftMinterSc)==null?void 0:ze.issueTokenFnName)||"issueToken",We,_e,ar=((_e=(We=r==null?void 0:r.config)==null?void 0:We.nftMinterSc)==null?void 0:_e.setLocalRolesFnName)||"setLocalRoles",Ze,Xe,ir=((Xe=(Ze=r==null?void 0:r.config)==null?void 0:Ze.nftMinterSc)==null?void 0:Xe.mintBaseGasLimit)||13e6,et,tt,cr=(tt=(et=r==null?void 0:r.config)==null?void 0:et.nftMinterSc)==null?void 0:tt.tokenSellingPrice,nt,rt,lr=((rt=(nt=r==null?void 0:r.config)==null?void 0:nt.nftMinterSc)==null?void 0:rt.mintFnName)||"mint",st,ot,dr=((ot=(st=r==null?void 0:r.config)==null?void 0:st.nftMinterSc)==null?void 0:ot.giveawayBaseGasLimit)||125e5,at,it,pr=((it=(at=r==null?void 0:r.config)==null?void 0:at.nftMinterSc)==null?void 0:it.giveawayFnName)||"giveaway",ct,lt,mr=((lt=(ct=r==null?void 0:r.config)==null?void 0:ct.nftMinterSc)==null?void 0:lt.setDropFnName)||"setDrop",dt,pt,he=((pt=(dt=r==null?void 0:r.config)==null?void 0:dt.nftMinterSc)==null?void 0:pt.setUnsetDropGasLimit)||5e6,mt,ut,ur=((ut=(mt=r==null?void 0:r.config)==null?void 0:mt.nftMinterSc)==null?void 0:ut.unsetDropFnName)||"unsetDrop",gt,ft,ye=((ft=(gt=r==null?void 0:r.config)==null?void 0:gt.nftMinterSc)==null?void 0:ft.pauseUnpauseGasLimit)||45e5,wt,ht,gr=((ht=(wt=r==null?void 0:r.config)==null?void 0:wt.nftMinterSc)==null?void 0:ht.pauseMintingFnName)||"pauseMinting",yt,bt,fr=((bt=(yt=r==null?void 0:r.config)==null?void 0:yt.nftMinterSc)==null?void 0:bt.unpauseMintingFnName)||"startMinting",Tt,Nt,wr=((Nt=(Tt=r==null?void 0:r.config)==null?void 0:Tt.nftMinterSc)==null?void 0:Nt.setNewPriceGasLimit)||45e5,At,xt,hr=((xt=(At=r==null?void 0:r.config)==null?void 0:At.nftMinterSc)==null?void 0:xt.setNewPriceFnName)||"setNewPrice",St,vt,yr=((vt=(St=r==null?void 0:r.config)==null?void 0:St.nftMinterSc)==null?void 0:vt.shuffleFnName)||"shuffle",kt,Pt,br=((Pt=(kt=r==null?void 0:r.config)==null?void 0:kt.nftMinterSc)==null?void 0:Pt.shuffleGasLimit)||5e6,Mt,Lt,Tr=((Lt=(Mt=r==null?void 0:r.config)==null?void 0:Mt.nftMinterSc)==null?void 0:Lt.getTotalTokensLeftFnName)||"getTotalTokensLeft",Ft,Dt,Nr=((Dt=(Ft=r==null?void 0:r.config)==null?void 0:Ft.nftMinterSc)==null?void 0:Dt.getProvenanceHashFnName)||"getProvenanceHash",Ot,Et,Ar=((Et=(Ot=r==null?void 0:r.config)==null?void 0:Ot.nftMinterSc)==null?void 0:Et.getDropTokensLeftFnName)||"getDropTokensLeft",Ct,Rt,xr=((Rt=(Ct=r==null?void 0:r.config)==null?void 0:Ct.nftMinterSc)==null?void 0:Rt.getNftPriceFnName)||"getNftPrice",It,jt,Sr=((jt=(It=r==null?void 0:r.config)==null?void 0:It.nftMinterSc)==null?void 0:jt.getNftTokenIdFnName)||"getNftTokenId",$t,Bt,vr=((Bt=($t=r==null?void 0:r.config)==null?void 0:$t.nftMinterSc)==null?void 0:Bt.getNftTokenNameFnName)||"getNftTokenName",Gt,Ut,kr=((Ut=(Gt=r==null?void 0:r.config)==null?void 0:Gt.nftMinterSc)==null?void 0:Ut.getCollectionTokenNameFnName)||"getCollectionTokenName",Qt,qt,Pr=((qt=(Qt=r==null?void 0:r.config)==null?void 0:Qt.nftMinterSc)==null?void 0:qt.getTokensLimitPerAddressTotalFnName)||"getTokensLimitPerAddressTotal",Yt,Kt,Mr=((Kt=(Yt=r==null?void 0:r.config)==null?void 0:Yt.nftMinterSc)==null?void 0:Kt.getMintedPerAddressTotalFnName)||"getMintedPerAddressTotal",Jt,Vt,Lr=((Vt=(Jt=r==null?void 0:r.config)==null?void 0:Jt.nftMinterSc)==null?void 0:Vt.changeBaseCidsFnName)||"changeBaseCids",Ht,zt,Fr=((zt=(Ht=r==null?void 0:r.config)==null?void 0:Ht.nftMinterSc)==null?void 0:zt.changeBaseCidsGasLimit)||5e6,Wt,_t,Dr=((_t=(Wt=r==null?void 0:r.config)==null?void 0:Wt.nftMinterSc)==null?void 0:_t.setNewTokensLimitPerAddressFnName)||"setNewTokensLimitPerAddress",Zt,Xt,Or=((Xt=(Zt=r==null?void 0:r.config)==null?void 0:Zt.nftMinterSc)==null?void 0:Xt.setNewTokensLimitPerAddressGasLimit)||5e6,en,tn,Er=((tn=(en=r==null?void 0:r.config)==null?void 0:en.nftMinterSc)==null?void 0:tn.claimScFundsFnName)||"claimScFunds",nn,rn,Cr=((rn=(nn=r==null?void 0:r.config)==null?void 0:nn.nftMinterSc)==null?void 0:rn.claimScFundsGasLimit)||6e6,sn,on,Rr=((on=(sn=r==null?void 0:r.config)==null?void 0:sn.nftMinterSc)==null?void 0:on.getMintedPerAddressPerDropFnName)||"getMintedPerAddressPerDrop",an,cn,Ir=((cn=(an=r==null?void 0:r.config)==null?void 0:an.nftMinterSc)==null?void 0:cn.getTokensLimitPerAddressPerDropFnName)||"getTokensLimitPerAddressPerDrop",ln,dn,H=((dn=(ln=r==null?void 0:r.config)==null?void 0:ln.nftMinterSc)==null?void 0:dn.allowlistBatchSize)||320,pn,mn,jr=((mn=(pn=r==null?void 0:r.config)==null?void 0:pn.nftMinterSc)==null?void 0:mn.populateAllowlistFnName)||"populateAllowlist",un,gn,$r=((gn=(un=r==null?void 0:r.config)==null?void 0:un.nftMinterSc)==null?void 0:gn.populateAllowlistBaseGasLimit)||6e6,fn,wn,Br=((wn=(fn=r==null?void 0:r.config)==null?void 0:fn.nftMinterSc)==null?void 0:wn.clearAllowlistFnName)||"clearAllowlist",hn,yn,Gr=((yn=(hn=r==null?void 0:r.config)==null?void 0:hn.nftMinterSc)==null?void 0:yn.clearAllowlistBaseGasLimit)||5e6,bn,Tn,Ur=((Tn=(bn=r==null?void 0:r.config)==null?void 0:bn.nftMinterSc)==null?void 0:Tn.removeAllowlistAddressFnName)||"removeAllowlistAddress",Nn,An,Qr=((An=(Nn=r==null?void 0:r.config)==null?void 0:Nn.nftMinterSc)==null?void 0:An.removeAllowlistAddressLimit)||5e6,xn,Sn,be=((Sn=(xn=r==null?void 0:r.config)==null?void 0:xn.nftMinterSc)==null?void 0:Sn.getAllowlistFnName)||"getAllowlistSize",vn,kn,qr=((kn=(vn=r==null?void 0:r.config)==null?void 0:vn.nftMinterSc)==null?void 0:kn.isAllowlistEnabledFnName)||"isAllowlistEnabled",Pn,Mn,Yr=((Mn=(Pn=r==null?void 0:r.config)==null?void 0:Pn.nftMinterSc)==null?void 0:Mn.getAllowlistAddressCheckFn)||"getAllowlistAddressCheck",Ln,Fn,Kr=((Fn=(Ln=r==null?void 0:r.config)==null?void 0:Ln.nftMinterSc)==null?void 0:Fn.enableAllowlistFnName)||"enableAllowlist",Dn,On,Jr=((On=(Dn=r==null?void 0:r.config)==null?void 0:Dn.nftMinterSc)==null?void 0:On.disableAllowlistFnName)||"disableAllowlist",En,Cn,Te=((Cn=(En=r==null?void 0:r.config)==null?void 0:En.nftMinterSc)==null?void 0:Cn.enableDisableAllowlistGasLimit)||6e6,Rn,In,Vr=((In=(Rn=r==null?void 0:r.config)==null?void 0:Rn.nftMinterSc)==null?void 0:In.isDropActiveFnName)||"isDropActive",jn,$n,Q=(($n=(jn=r==null?void 0:r.config)==null?void 0:jn.nftMinterSc)==null?void 0:$n.tokensPerOneTx)||90,Bn,Gn,Hr=((Gn=(Bn=r==null?void 0:r.config)==null?void 0:Bn.nftMinterSc)==null?void 0:Gn.isMintingPausedFnName)||"isMintingPaused",Un,Qn,zr=((Qn=(Un=r==null?void 0:r.config)==null?void 0:Un.nftMinterSc)==null?void 0:Qn.getTotalSupplyFnName)||"getTotalSupply",qn,Yn,Wr=((Yn=(qn=r==null?void 0:r.config)==null?void 0:qn.nftMinterSc)==null?void 0:Yn.getTotalSupplyOfCurrentDropFnName)||"getTotalSupplyOfCurrentDrop",Kn,Jn,_r=((Jn=(Kn=r==null?void 0:r.config)==null?void 0:Kn.collectionNftOwners)==null?void 0:Jn.apiCallsPerSecond)||5,Vn,Hn,Zr=((Hn=(Vn=r==null?void 0:r.config)==null?void 0:Vn.distributeToOwners)==null?void 0:Hn.apiCallsPerSecond)||5,zn,Wn,Uo=((Wn=(zn=r==null?void 0:r.config)==null?void 0:zn.minterDapp)==null?void 0:Wn.version)||Z.elvenTools.minterDappVersionTagName,_n,se=(_n=r==null?void 0:r.config)==null?void 0:_n.apiProviderEndpoint,j={local:se||"http://localhost:7950",testnet:se||"https://testnet-api.elrond.com",devnet:se||"https://devnet-api.elrond.com",mainnet:se||"https://api.elrond.com"},Zn,V=(Zn=r==null?void 0:r.config)==null?void 0:Zn.gatewayProviderEndpoint,Xr={local:V||"http://localhost:7950",testnet:V||"https://testnet-gateway.elrond.com",devnet:V||"https://devnet-gateway.elrond.com",mainnet:V||"https://gateway.elrond.com"},w={testnet:"T",devnet:"D",mainnet:"1"},oe={devnet:"https://devnet-explorer.elrond.com",testnet:"https://testnet-explorer.elrond.com",mainnet:"https://explorer.elrond.com"},es=`Enter mnemonic (seed phrase) | ||
`,ts=`Enter the name for the collection token (ex. MyName123). | ||
var Bo=Object.defineProperty;var Ce=Object.getOwnPropertySymbols;var Uo=Object.prototype.hasOwnProperty,Qo=Object.prototype.propertyIsEnumerable;var Re=(r,e,t)=>e in r?Bo(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,R=(r,e)=>{for(var t in e||(e={}))Uo.call(e,t)&&Re(r,t,e[t]);if(Ce)for(var t of Ce(e))Qo.call(e,t)&&Re(r,t,e[t]);return r};var d=(r,e,t)=>new Promise((s,o)=>{var a=l=>{try{c(t.next(l))}catch(p){o(p)}},i=l=>{try{c(t.throw(l))}catch(p){o(p)}},c=l=>l.done?s(l.value):Promise.resolve(l.value).then(a,i);c((t=t.apply(r,e)).next())});import{exit as Ee,argv as oi}from"process";import{exit as Me}from"process";import{unlinkSync as ca}from"fs";import la from"ora";import da from"prompts";import{cosmiconfigSync as Yo}from"cosmiconfig";import{cwd as Ko}from"process";var _={name:"elven-tools",engines:{node:"^12.20.0 || ^14.13.1 || >=16.0.0"},type:"module",types:"build/types",version:"1.15.0",elvenTools:{smartContractVersionTagName:"v1.9.0",minterDappVersionTagName:"v3.1.1"},description:"Interacting with custom NFT related Smart Contracts on the Elrond blockchain",main:"build/index.js",bin:{"elven-tools":"./build/index.js"},scripts:{generate:"npm run build && node build/index.js",build:"rimraf build && node ./esbuild.config.js && tsc","dev:lint":"eslint src/** --fix","dev:prettier":"prettier --write 'src/**/*.{js,ts,json}'",prepublishOnly:"npm run build"},author:"Julian \u0106wirko <julian.io>",license:"MIT",homepage:"https://github.com/ElvenTools/elven-tools-cli",repository:{type:"git",url:"https://github.com/ElvenTools/elven-tools-cli"},keywords:["elrond","blockchain","sdk","javascript","nft","cli"],devDependencies:{"@types/cross-spawn":"^6.0.2","@types/download":"8.0.1","@types/ledgerhq__hw-transport":"^4.21.4","@types/node":"^18.6.4","@types/prompt":"^1.1.2","@types/prompts":"^2.0.14","@typescript-eslint/eslint-plugin":"^5.32.0","@typescript-eslint/parser":"^5.32.0",esbuild:"^0.14.53",eslint:"^8.21.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1",prettier:"^2.7.1",rimraf:"^3.0.2",typescript:"^4.7.4"},dependencies:{"@elrondnetwork/erdjs":"11.0.0","@elrondnetwork/erdjs-network-providers":"1.0.0","@elrondnetwork/erdjs-walletcore":"2.0.0",axios:"^0.27.2","bignumber.js":"9.0.2",cosmiconfig:"^7.0.1","cross-fetch":"^3.1.5","cross-spawn":"7.0.3",download:"github:XhmikosR/download#dev",ora:"6.1.2","p-throttle":"5.0.0",prompts:"^2.4.2"}};var Jo="elventools",Vo=Yo(Jo),n=Vo.search(Ko()),Ie,g=((Ie=n==null?void 0:n.config)==null?void 0:Ie.chain)||"devnet",je,$e,nr=($e=(je=n==null?void 0:n.config)==null?void 0:je.nftMinterSc)==null?void 0:$e.deployNftMinterSC,Ge,Be,rr=((Be=(Ge=n==null?void 0:n.config)==null?void 0:Ge.nftMinterSc)==null?void 0:Be.deployGasLimit)||12e7,Ue,Qe,sr=((Qe=(Ue=n==null?void 0:n.config)==null?void 0:Ue.nftMinterSc)==null?void 0:Qe.version)||_.elvenTools.smartContractVersionTagName,qe,Ye,or=((Ye=(qe=n==null?void 0:n.config)==null?void 0:qe.nftMinterSc)==null?void 0:Ye.issueCollectionTokenGasLimit)||8e7,Ke,Je,ar=((Je=(Ke=n==null?void 0:n.config)==null?void 0:Ke.nftMinterSc)==null?void 0:Je.issueValue)||.05,Ve,He,ir=((He=(Ve=n==null?void 0:n.config)==null?void 0:Ve.nftMinterSc)==null?void 0:He.assignRolesGasLimit)||8e7,ze,We,cr=((We=(ze=n==null?void 0:n.config)==null?void 0:ze.nftMinterSc)==null?void 0:We.issueTokenFnName)||"issueToken",_e,Ze,lr=((Ze=(_e=n==null?void 0:n.config)==null?void 0:_e.nftMinterSc)==null?void 0:Ze.setLocalRolesFnName)||"setLocalRoles",Xe,et,dr=((et=(Xe=n==null?void 0:n.config)==null?void 0:Xe.nftMinterSc)==null?void 0:et.mintBaseGasLimit)||125e5,tt,nt,mr=(nt=(tt=n==null?void 0:n.config)==null?void 0:tt.nftMinterSc)==null?void 0:nt.tokenSellingPrice,rt,st,pr=((st=(rt=n==null?void 0:n.config)==null?void 0:rt.nftMinterSc)==null?void 0:st.mintFnName)||"mint",ot,at,ur=((at=(ot=n==null?void 0:n.config)==null?void 0:ot.nftMinterSc)==null?void 0:at.giveawayBaseGasLimit)||12e6,it,ct,gr=((ct=(it=n==null?void 0:n.config)==null?void 0:it.nftMinterSc)==null?void 0:ct.giveawayFnName)||"giveaway",lt,dt,fr=((dt=(lt=n==null?void 0:n.config)==null?void 0:lt.nftMinterSc)==null?void 0:dt.setDropFnName)||"setDrop",mt,pt,ye=((pt=(mt=n==null?void 0:n.config)==null?void 0:mt.nftMinterSc)==null?void 0:pt.setUnsetDropGasLimit)||5e6,ut,gt,wr=((gt=(ut=n==null?void 0:n.config)==null?void 0:ut.nftMinterSc)==null?void 0:gt.unsetDropFnName)||"unsetDrop",ft,wt,be=((wt=(ft=n==null?void 0:n.config)==null?void 0:ft.nftMinterSc)==null?void 0:wt.pauseUnpauseGasLimit)||45e5,ht,yt,hr=((yt=(ht=n==null?void 0:n.config)==null?void 0:ht.nftMinterSc)==null?void 0:yt.pauseMintingFnName)||"pauseMinting",bt,Tt,yr=((Tt=(bt=n==null?void 0:n.config)==null?void 0:bt.nftMinterSc)==null?void 0:Tt.unpauseMintingFnName)||"startMinting",Nt,At,br=((At=(Nt=n==null?void 0:n.config)==null?void 0:Nt.nftMinterSc)==null?void 0:At.setNewPriceGasLimit)||45e5,xt,St,Tr=((St=(xt=n==null?void 0:n.config)==null?void 0:xt.nftMinterSc)==null?void 0:St.setNewPriceFnName)||"setNewPrice",vt,kt,Nr=((kt=(vt=n==null?void 0:n.config)==null?void 0:vt.nftMinterSc)==null?void 0:kt.shuffleFnName)||"shuffle",Pt,Mt,Ar=((Mt=(Pt=n==null?void 0:n.config)==null?void 0:Pt.nftMinterSc)==null?void 0:Mt.shuffleGasLimit)||5e6,Lt,Ft,xr=((Ft=(Lt=n==null?void 0:n.config)==null?void 0:Lt.nftMinterSc)==null?void 0:Ft.getTotalTokensLeftFnName)||"getTotalTokensLeft",Dt,Ot,Sr=((Ot=(Dt=n==null?void 0:n.config)==null?void 0:Dt.nftMinterSc)==null?void 0:Ot.getProvenanceHashFnName)||"getProvenanceHash",Et,Ct,vr=((Ct=(Et=n==null?void 0:n.config)==null?void 0:Et.nftMinterSc)==null?void 0:Ct.getDropTokensLeftFnName)||"getDropTokensLeft",Rt,It,kr=((It=(Rt=n==null?void 0:n.config)==null?void 0:Rt.nftMinterSc)==null?void 0:It.getNftPriceFnName)||"getNftPrice",jt,$t,Pr=(($t=(jt=n==null?void 0:n.config)==null?void 0:jt.nftMinterSc)==null?void 0:$t.getNftTokenIdFnName)||"getNftTokenId",Gt,Bt,Mr=((Bt=(Gt=n==null?void 0:n.config)==null?void 0:Gt.nftMinterSc)==null?void 0:Bt.getNftTokenNameFnName)||"getNftTokenName",Ut,Qt,Lr=((Qt=(Ut=n==null?void 0:n.config)==null?void 0:Ut.nftMinterSc)==null?void 0:Qt.getCollectionTokenNameFnName)||"getCollectionTokenName",qt,Yt,Fr=((Yt=(qt=n==null?void 0:n.config)==null?void 0:qt.nftMinterSc)==null?void 0:Yt.getTokensLimitPerAddressTotalFnName)||"getTokensLimitPerAddressTotal",Kt,Jt,Dr=((Jt=(Kt=n==null?void 0:n.config)==null?void 0:Kt.nftMinterSc)==null?void 0:Jt.getMintedPerAddressTotalFnName)||"getMintedPerAddressTotal",Vt,Ht,Or=((Ht=(Vt=n==null?void 0:n.config)==null?void 0:Vt.nftMinterSc)==null?void 0:Ht.changeBaseCidsFnName)||"changeBaseCids",zt,Wt,Er=((Wt=(zt=n==null?void 0:n.config)==null?void 0:zt.nftMinterSc)==null?void 0:Wt.changeBaseCidsGasLimit)||5e6,_t,Zt,Cr=((Zt=(_t=n==null?void 0:n.config)==null?void 0:_t.nftMinterSc)==null?void 0:Zt.setNewTokensLimitPerAddressFnName)||"setNewTokensLimitPerAddress",Xt,en,Rr=((en=(Xt=n==null?void 0:n.config)==null?void 0:Xt.nftMinterSc)==null?void 0:en.setNewTokensLimitPerAddressGasLimit)||5e6,tn,nn,Ir=((nn=(tn=n==null?void 0:n.config)==null?void 0:tn.nftMinterSc)==null?void 0:nn.claimScFundsFnName)||"claimScFunds",rn,sn,jr=((sn=(rn=n==null?void 0:n.config)==null?void 0:rn.nftMinterSc)==null?void 0:sn.claimScFundsGasLimit)||6e6,on,an,$r=((an=(on=n==null?void 0:n.config)==null?void 0:on.nftMinterSc)==null?void 0:an.getMintedPerAddressPerDropFnName)||"getMintedPerAddressPerDrop",cn,ln,Gr=((ln=(cn=n==null?void 0:n.config)==null?void 0:cn.nftMinterSc)==null?void 0:ln.getTokensLimitPerAddressPerDropFnName)||"getTokensLimitPerAddressPerDrop",dn,mn,V=((mn=(dn=n==null?void 0:n.config)==null?void 0:dn.nftMinterSc)==null?void 0:mn.allowlistBatchSize)||320,pn,un,Br=((un=(pn=n==null?void 0:n.config)==null?void 0:pn.nftMinterSc)==null?void 0:un.populateAllowlistFnName)||"populateAllowlist",gn,fn,Ur=((fn=(gn=n==null?void 0:n.config)==null?void 0:gn.nftMinterSc)==null?void 0:fn.populateAllowlistBaseGasLimit)||6e6,wn,hn,Qr=((hn=(wn=n==null?void 0:n.config)==null?void 0:wn.nftMinterSc)==null?void 0:hn.clearAllowlistFnName)||"clearAllowlist",yn,bn,qr=((bn=(yn=n==null?void 0:n.config)==null?void 0:yn.nftMinterSc)==null?void 0:bn.clearAllowlistBaseGasLimit)||5e6,Tn,Nn,Yr=((Nn=(Tn=n==null?void 0:n.config)==null?void 0:Tn.nftMinterSc)==null?void 0:Nn.removeAllowlistAddressFnName)||"removeAllowlistAddress",An,xn,Kr=((xn=(An=n==null?void 0:n.config)==null?void 0:An.nftMinterSc)==null?void 0:xn.removeAllowlistAddressLimit)||5e6,Sn,vn,Te=((vn=(Sn=n==null?void 0:n.config)==null?void 0:Sn.nftMinterSc)==null?void 0:vn.getAllowlistFnName)||"getAllowlistSize",kn,Pn,Jr=((Pn=(kn=n==null?void 0:n.config)==null?void 0:kn.nftMinterSc)==null?void 0:Pn.isAllowlistEnabledFnName)||"isAllowlistEnabled",Mn,Ln,Vr=((Ln=(Mn=n==null?void 0:n.config)==null?void 0:Mn.nftMinterSc)==null?void 0:Ln.getAllowlistAddressCheckFn)||"getAllowlistAddressCheck",Fn,Dn,Hr=((Dn=(Fn=n==null?void 0:n.config)==null?void 0:Fn.nftMinterSc)==null?void 0:Dn.enableAllowlistFnName)||"enableAllowlist",On,En,zr=((En=(On=n==null?void 0:n.config)==null?void 0:On.nftMinterSc)==null?void 0:En.disableAllowlistFnName)||"disableAllowlist",Cn,Rn,Ne=((Rn=(Cn=n==null?void 0:n.config)==null?void 0:Cn.nftMinterSc)==null?void 0:Rn.enableDisableAllowlistGasLimit)||6e6,In,jn,Wr=((jn=(In=n==null?void 0:n.config)==null?void 0:In.nftMinterSc)==null?void 0:jn.isDropActiveFnName)||"isDropActive",$n,Gn,Z=((Gn=($n=n==null?void 0:n.config)==null?void 0:$n.nftMinterSc)==null?void 0:Gn.tokensPerOneTx)||95,Bn,Un,X=((Un=(Bn=n==null?void 0:n.config)==null?void 0:Bn.nftMinterSc)==null?void 0:Un.tokensPerOneGiveawayTx)||99,Qn,qn,_r=((qn=(Qn=n==null?void 0:n.config)==null?void 0:Qn.nftMinterSc)==null?void 0:qn.isMintingPausedFnName)||"isMintingPaused",Yn,Kn,Zr=((Kn=(Yn=n==null?void 0:n.config)==null?void 0:Yn.nftMinterSc)==null?void 0:Kn.getTotalSupplyFnName)||"getTotalSupply",Jn,Vn,Xr=((Vn=(Jn=n==null?void 0:n.config)==null?void 0:Jn.nftMinterSc)==null?void 0:Vn.getTotalSupplyOfCurrentDropFnName)||"getTotalSupplyOfCurrentDrop",Hn,zn,es=((zn=(Hn=n==null?void 0:n.config)==null?void 0:Hn.collectionNftOwners)==null?void 0:zn.apiCallsPerSecond)||5,Wn,_n,ts=((_n=(Wn=n==null?void 0:n.config)==null?void 0:Wn.distributeToOwners)==null?void 0:_n.apiCallsPerSecond)||5,Zn,Xn,Ho=((Xn=(Zn=n==null?void 0:n.config)==null?void 0:Zn.minterDapp)==null?void 0:Xn.version)||_.elvenTools.minterDappVersionTagName,er,oe=(er=n==null?void 0:n.config)==null?void 0:er.apiProviderEndpoint,j={local:oe||"http://localhost:7950",testnet:oe||"https://testnet-api.elrond.com",devnet:oe||"https://devnet-api.elrond.com",mainnet:oe||"https://api.elrond.com"},tr,J=(tr=n==null?void 0:n.config)==null?void 0:tr.gatewayProviderEndpoint,ns={local:J||"http://localhost:7950",testnet:J||"https://testnet-gateway.elrond.com",devnet:J||"https://devnet-gateway.elrond.com",mainnet:J||"https://gateway.elrond.com"},w={testnet:"T",devnet:"D",mainnet:"1"},ae={devnet:"https://devnet-explorer.elrond.com",testnet:"https://testnet-explorer.elrond.com",mainnet:"https://explorer.elrond.com"},rs=`Enter mnemonic (seed phrase) | ||
`,ss=`Enter the name for the collection token (ex. MyName123). | ||
(3-20 characters, alphanumeric only) | ||
`,ns=`Enter the ticker for the collection token (ex. MYNAME). | ||
`,os=`Enter the ticker for the collection token (ex. MYNAME). | ||
(3-10 characters, alphanumeric and uppercase only) | ||
`,rs=`Enter the name for NFTs. If not provided, the name of the collection will be used. | ||
`,as=`Enter the name for NFTs. If not provided, the name of the collection will be used. | ||
Each name will additionally get a unique number, so don't add the numbers here. (Optional) | ||
`,ae=`Provide the base assets files IPFS CID: | ||
`,ie=`Provide the base metadata files IPFS CID: | ||
`,ss=`Provide amount of tokens in collection: | ||
`,ce=`Provide the seling price (ex. 0.5 for 0.5 EGLD): | ||
`,os=`Provide the royalties value (ex. 5.5 for 5.5%) [optional]: | ||
`,as=`Provide tags (ex. tag1,tag2,tag3) [optional]: | ||
`,is=`Provide the provenance hash (sha256 hash of all images) [optional]: | ||
`,le=`Total tokens limit per one address per whole collection (the best is to keep it as low as possible): | ||
`,cs=`Provide the file extension: | ||
`,ls=`Provide how many tokens should be minted. | ||
`,ie=`Provide the base assets files IPFS CID: | ||
`,ce=`Provide the base metadata files IPFS CID: | ||
`,is=`Provide amount of tokens in collection: | ||
`,le=`Provide the selling price (ex. 0.5 for 0.5 EGLD): | ||
`,cs=`Provide the royalties value (ex. 5.5 for 5.5%) [optional]: | ||
`,ls=`Provide tags (ex. tag1,tag2,tag3) [optional]: | ||
`,ds=`Provide the provenance hash (sha256 hash of all images) [optional]: | ||
`,de=`Total tokens limit per one address per whole collection (the best is to keep it as low as possible): | ||
`,ms=`Provide the file extension: | ||
`,ps=`Provide how many tokens should be minted. | ||
Take into account possible limitations set on the Smart Contract. | ||
You need to provide the value which fits in limits as a whole. Max ${Q} because of the max gas limit per transaction: | ||
`,ds=`Provide the address for giveaway: | ||
`,ps=`Provide how many tokens you want to give away. | ||
Take into account possible limitations set on the Smart Contract | ||
You need to provide the value which fits in limits as a whole. Max ${Q} because of the max gas limit per transaction: | ||
`,ms=`Provide the amount of the tokens for the drop: | ||
`,us=`Are you sure that you want to proceed? | ||
`,gs=`Decide if the contract can be upgraded in the future. | ||
`,fs=`Decide if the contract's storage can be read by other contracts. Not recommended in this case. | ||
`,ws=`Decide if the contract can receive funds. | ||
`,hs=`Decide if the contract can receive funds from other smart contract. Recommended because of the royalties. | ||
`,ys=`Provide the tokens limit per single address per whole drop (the best is to keep it as low as possible) [optional]: | ||
`,bs=`Do you want to attach the metadata JSON file in the Assets/Uris? | ||
You need to provide the value which fits in limits as a whole. Max ${Z} because of the max gas limit per transaction: | ||
`,us=`Provide the list of addresses. | ||
Separate them with comma (","): | ||
`,gs=`Provide how many tokens per one address you want to give away. Max ${X} in total because of the max gas limit per transaction: | ||
`,fs=`Provide the amount of the tokens for the drop: | ||
`,ws=`Are you sure that you want to proceed? | ||
`,hs=`Decide if the contract can be upgraded in the future. | ||
`,ys=`Decide if the contract's storage can be read by other contracts. Not recommended in this case. | ||
`,bs=`Decide if the contract can receive funds. | ||
`,Ts=`Decide if the contract can receive funds from other smart contract. Recommended because of the royalties. | ||
`,Ns=`Provide the tokens limit per single address per whole drop (the best is to keep it as low as possible) [optional]: | ||
`,As=`Do you want to attach the metadata JSON file in the Assets/Uris? | ||
(It will be attached and encoded in the attributes anyway, but some marketplaces require that). | ||
`,Ts=`Provide the list of addresses. Max ${H} addresses per one transaction. | ||
`,xs=`Provide the list of addresses. Max ${V} addresses per one transaction. | ||
You can add more by sending more transactions. Separate them with comma (","): | ||
`,Ns=`Provide the collection ticker | ||
`,As=`Do you want to exclude smart contract addresses? | ||
`,xs=`Do you want to filter by metadata JSON file name? Provide names without the extension separated by a comma (example: 123,555,9999) [you can ommit that, just confirm empty] | ||
`,Ss=`Please provide the project name (directory name) in which the dapp should be initialized. | ||
`,vs=`Provide address to remove. | ||
`,ks="walletKey.pem",Ps="sc/nft-minter/elven-nft-minter.abi.json",Ms="sc/nft-minter/elven-nft-minter.wasm",Ls=`https://raw.githubusercontent.com/ElvenTools/elven-nft-minter-sc/${tr}/output/elven-nft-minter.abi.json`,Fs=`https://raw.githubusercontent.com/ElvenTools/elven-nft-minter-sc/${tr}/output/elven-nft-minter.wasm`,Ne=`https://github.com/ElvenTools/elven-tools-dapp/archive/refs/tags/${Uo}.zip`,q="output.json",Ds="allowlist.json";import{SmartContract as de,Account as Qo,SmartContractAbi as Os,Code as Es,AbiRegistry as Cs,Address as L,ContractFunction as A,BytesValue as R,TokenPayment as O,U32Value as Y,BigUIntValue as Ae,AddressValue as z,Transaction as X,TransactionPayload as Is,CodeMetadata as qo,BooleanValue as Yo,List as Ko,ListType as Jo,AddressType as Vo,TransactionWatcher as ee,ESDTTransferPayloadBuilder as Ho,ESDTNFTTransferPayloadBuilder as js}from"@elrondnetwork/erdjs";import $s from"axios";import{parseUserKey as zo,UserSigner as Wo}from"@elrondnetwork/erdjs-walletcore";import{ApiNetworkProvider as _o,ProxyNetworkProvider as Zo}from"@elrondnetwork/erdjs-network-providers";import Xo from"prompts";import xe from"bignumber.js";import Bs from"ora";import{readFileSync as Gs,accessSync as pe,constants as $,writeFileSync as Rs,promises as Us}from"fs";import{exit as me,cwd as ea}from"process";var ue=ea(),I=(n,e)=>{let t=(e==null?void 0:e.isJSON)===void 0?!0:e.isJSON,s=(e==null?void 0:e.noExitOnError)===void 0?!1:e.noExitOnError,o=`${ue}/${n}`;try{pe(o,$.R_OK|$.W_OK)}catch(c){if(!s)console.error(`There is no ${n}!`),me(9);else return}let i=Gs(o).toString("utf8");return t?JSON.parse(i):i};var Se=()=>V?new Zo(Xr[u],{timeout:1e4}):new _o(j[u],{timeout:1e4}),Qs=(n,e)=>new de({address:e?new L(e):void 0,abi:n}),qs=n=>d(void 0,null,function*(){let t=zo(n).generatePublicKey().toAddress();return new Qo(t)}),Ys=n=>Wo.fromPem(n),Ks=(n,e)=>d(void 0,null,function*(){try{pe(n,$.R_OK|$.W_OK);let t=yield Us.readFile(n,{encoding:"utf8"}),s=JSON.parse(t),o=Cs.create(s);return new Os(o)}catch(t){let s=yield $s.get(e),o=Cs.create(s.data);return new Os(o)}}),Js=(n,e)=>d(void 0,null,function*(){try{pe(n,$.R_OK|$.W_OK);let t=yield Us.readFile(n);return Es.fromBuffer(t)}catch(t){let s=yield $s.get(e,{responseType:"arraybuffer",transformResponse:[],headers:{Accept:"application/wasm"}}),o=Buffer.from(s.data);return Es.fromBuffer(o)}}),Vs=(n,e,t,s,o,a,i,c,l,g,m,f,S=!0,h=!1,v=!1,P=!0,E=!1)=>e.deploy({code:n,codeMetadata:new qo(S,h,v,P),gasLimit:t,initArguments:[R.fromUTF8(s.trim()),R.fromUTF8(a.trim()),new Y(i),new Y(c),new Ae(new xe(Number(g)*100||0)),new Ae(O.egldFromAmount(l.trim()).valueOf()),R.fromUTF8(o.trim()),R.fromUTF8((m==null?void 0:m.trim())||""),R.fromUTF8((f==null?void 0:f.trim())||""),new Yo(E)],chainID:w[u]}),ge=({scAddress:n,sellingPrice:e,tokenId:t})=>{let s=`${ue}/${q}`;try{pe(s,$.R_OK|$.W_OK);let o=Gs(s,{encoding:"utf8"}),a=C(C(C(C({},JSON.parse(o)),n?{nftMinterScAddress:n.bech32()}:{}),e?{nftMinterScCollectionSellingPrice:O.egldFromAmount(e).toString()}:{}),t?{nftMinterCollectionToken:t}:{});return Rs(s,JSON.stringify(a,null,2))}catch(o){return Rs(s,JSON.stringify(C(C(C({},n?{nftMinterScAddress:n.bech32()}:{}),e?{nftMinterScCollectionSellingPrice:O.egldFromAmount(e).toString()}:{}),t?{nftMinterCollectionToken:t}:{}),null,2))}},Hs=(n,e,t,s,o,a)=>n.call({func:new A(or),args:[R.fromUTF8(s.trim()),R.fromUTF8(o.trim()),...a?[R.fromUTF8(a.trim())]:[]],value:O.egldFromAmount(t),gasLimit:e,chainID:w[u]}),y=()=>{let n=I(q,{noExitOnError:!0}),e=Xn||(n==null?void 0:n.nftMinterScAddress);return e||(console.log("Smart Contract address isn't provided. Please deploy it or add the address to the configuration if it is already deployed."),me(9)),e},zs=(n,e)=>n.call({func:new A(ar),gasLimit:e,chainID:w[u]}),Ws=(n,e,t)=>{let s=t||1,o=I(q,{noExitOnError:!0}),a=cr||(o==null?void 0:o.nftMinterScCollectionSellingPrice);if(!a)console.log("Price per token isn't provided. Please add it to the config file."),me(9);else{let i=new de({address:new L(n)}),c=new xe(a).times(s);return i.call({func:new A(lr),gasLimit:e+e/2*(t-1),chainID:w[u],args:[new Y(s)],value:O.egldFromBigInteger(c)})}},_s=(n,e,t,s)=>{let o=s||1;return n.call({func:new A(pr),gasLimit:e+e/2*(s-1),chainID:w[u],args:[new z(new L(t.trim())),new Y(o)]})},Zs=(n,e,t,s)=>n.call({func:new A(mr),gasLimit:e,chainID:w[u],args:[new Y(t),...s?[new Y(s)]:[]]}),Xs=(n,e)=>n.call({func:new A(ur),gasLimit:e,chainID:w[u]}),eo=(n,e)=>n.call({func:new A(gr),gasLimit:e,chainID:w[u]}),to=(n,e)=>n.call({func:new A(fr),gasLimit:e,chainID:w[u]}),no=(n,e)=>n.call({func:new A(Kr),gasLimit:e,chainID:w[u]}),ro=(n,e)=>n.call({func:new A(Jr),gasLimit:e,chainID:w[u]}),b=(n,e,t,s)=>d(void 0,null,function*(){n.setNonce(e.nonce),e.incrementNonce(),t.sign(n);let o=Bs("Processing the transaction...");o.start(),yield s.sendTransaction(n);let i=yield new ee(s).awaitCompleted(n),c=i.hash,l=i.status;o.stop(),console.log(` | ||
Transaction status: ${l}`),console.log(`Transaction link: ${oe[u]}/transactions/${c} | ||
`)}),so=(n,e,t)=>n.call({func:new A(hr),gasLimit:e,chainID:w[u],args:[new Ae(O.egldFromAmount(t.trim()).valueOf())]}),ta=[{type:"select",name:"areYouSureAnswer",message:us,choices:[{title:"Yes",value:"yes"},{title:"No",value:"no"}]}],k=()=>d(void 0,null,function*(){let{areYouSureAnswer:n}=yield Xo(ta);n!=="yes"&&(console.log("Aborted!"),me(9))}),oo=(n,e)=>new X({data:new Is("ClaimDeveloperRewards"),gasLimit:6e6,chainID:w[u],sender:e.address,receiver:n.getAddress(),value:O.egldFromAmount(0)}),ao=(n,e)=>new de({address:new L(n)}).call({func:new A(yr),gasLimit:e,chainID:w[u],args:[]}),ve=(n,e,t,s=[])=>{let a=new de({address:new L(e)}).createQuery({func:new A(n),args:s});return t.queryContract(a)},na=n=>{var t,s;return((s=(t=n.getReturnDataParts())==null?void 0:t[0])==null?void 0:s.toString("hex"))==="01"?"true":"false"},ke=n=>{var t,s;let e=(s=(t=n.getReturnDataParts())==null?void 0:t[0])==null?void 0:s.toString("hex");return new xe(e,16).toString(10)},ra=n=>{var t,s;return(s=(t=n.getReturnDataParts())==null?void 0:t[0])==null?void 0:s.toString("utf8")},x=a=>d(void 0,[a],function*({functionName:n,resultLabel:e,resultType:t,resultModifier:s,args:o}){let i=y(),c=Bs("Processing query...");try{let l=Se();c.start();let g=yield ve(n,i,l,o);c.stop();let m;t==="string"?m=ra(g):t==="boolean"?m=na(g):m=ke(g),s==null||s(m.trim()),console.log(`${e||"Query results:"} `,s?s(m.trim()):m.trim())}catch(l){c.stop(),console.log(l==null?void 0:l.message)}}),io=n=>{x({functionName:Mr,resultLabel:"Tokens already minted per address:",resultType:"number",args:[new z(new L(n))]})},co=n=>{x({functionName:Rr,resultLabel:"Tokens already minted per address per drop:",resultType:"number",args:[new z(new L(n))]})},lo=n=>{x({functionName:Yr,resultType:"boolean",resultLabel:"Result:",resultModifier:e=>e==="true"?"Provided address is included!":"Provided address isn't included!",args:[new z(new L(n))]})},po=(n,e,t,s)=>n.call({func:new A(Lr),gasLimit:e,chainID:w[u],args:[R.fromUTF8(t.trim()),R.fromUTF8(s.trim())]}),mo=(n,e,t)=>n.call({func:new A(Dr),gasLimit:e,chainID:w[u],args:[new Y(t)]}),uo=(n,e)=>n.call({func:new A(Er),gasLimit:e,chainID:w[u]}),go=(n,e,t)=>{let s=()=>new Ko(new Jo(new Vo),t.map(o=>new z(new L(o))));return n.call({func:new A(jr),gasLimit:e+185e4*(t.length-1),chainID:w[u],args:[s()]})},fo=(n,e,t)=>n.call({func:new A(Br),gasLimit:e+445e3*(t-1),chainID:w[u]}),wo=(n,e,t)=>n.call({func:new A(Ur),gasLimit:e,chainID:w[u],args:[new z(new L(t))]}),ho=(n,e,t,s,o)=>d(void 0,null,function*(){let a=O.egldFromAmount(n),i=s.getAddress(),c=new Is("EGLD distribution made by Elven Tools CLI"),l=new X({data:c,gasLimit:5e4+1500*c.length(),sender:i,receiver:new L(e.trim()),value:a,chainID:w[u]});l.setNonce(t.nonce),t.incrementNonce(),s.sign(l);try{yield o.sendTransaction(l);let f=(yield new ee(o).awaitCompleted(l)).hash,S=yield o.getTransactionStatus(f);return{receiverAddress:e,txHash:f,txStatus:S.status}}catch(g){return console.log(JSON.stringify(g)),{receiverAddress:e,txHash:"",txStatus:"failed"}}}),yo=(n,e,t,s,o,a,i)=>d(void 0,null,function*(){let c=O.fungibleFromAmount(a,n,i),l=new Ho().setPayment(c).build(),g=s.getAddress(),m=new X({data:l,gasLimit:5e4+1500*l.length()+3e5,sender:g,receiver:new L(e.trim()),chainID:w[u]});m.setNonce(t.nonce),t.incrementNonce(),s.sign(m);try{yield o.sendTransaction(m);let h=(yield new ee(o).awaitCompleted(m)).hash,v=yield o.getTransactionStatus(h);return{receiverAddress:e,txHash:h,txStatus:v.status}}catch(f){return console.log(JSON.stringify(f)),{receiverAddress:e,txHash:"",txStatus:"failed"}}}),bo=(n,e,t,s,o,a,i,c)=>d(void 0,null,function*(){let l=O.metaEsdtFromAmount(i,c,n,a),g=new js().setPayment(l).setDestination(new L(e.trim())).build(),m=s.getAddress(),f=new X({nonce:c,data:g,gasLimit:5e4+1500*g.length()+3e5,sender:m,receiver:m,chainID:w[u]});f.setNonce(t.nonce),t.incrementNonce(),s.sign(f);try{yield o.sendTransaction(f);let v=(yield new ee(o).awaitCompleted(f)).hash,P=yield o.getTransactionStatus(v);return{receiverAddress:e,txHash:v,txStatus:P.status}}catch(S){return console.log(JSON.stringify(S)),{receiverAddress:e,txHash:"",txStatus:"failed"}}}),To=(n,e,t,s,o,a,i)=>d(void 0,null,function*(){let c=O.semiFungible(a,i,Number(n)),l=new js().setPayment(c).setDestination(new L(e.trim())).build(),g=s.getAddress(),m=new X({nonce:i,data:l,gasLimit:5e4+1500*l.length()+3e5,sender:g,receiver:g,chainID:w[u]});m.setNonce(t.nonce),t.incrementNonce(),s.sign(m);try{yield o.sendTransaction(m);let h=(yield new ee(o).awaitCompleted(m)).hash,v=yield o.getTransactionStatus(h);return{receiverAddress:e,txHash:h,txStatus:v.status}}catch(f){return console.log(JSON.stringify(f)),{receiverAddress:e,txHash:"",txStatus:"failed"}}});var W=()=>d(void 0,null,function*(){let n=I(ks,{isJSON:!1}),e=Se(),t=yield qs(n),s=yield e.getAccount(t.address);return t.update(s),{signer:Ys(n),userAccount:t,provider:e}}),T=n=>d(void 0,null,function*(){let e=yield Ks(Ps,Ls),t=yield Js(Ms,Fs),s=Qs(e,n),o=yield W();return C({scWasmCode:t,smartContract:s},o)});import{TransactionWatcher as ia,SmartContract as ca}from"@elrondnetwork/erdjs";var la=()=>d(void 0,null,function*(){I(q,{noExitOnError:!0})&&sa(`${ue}/${q}`);let e=[{type:"select",name:"nftSCupgradable",message:gs,choices:[{title:"Yes",value:!0},{title:"No",value:!1}]},{type:"select",name:"nftSCreadable",message:fs,choices:[{title:"No",value:!1},{title:"Yes",value:!0}]},{type:"select",name:"nftSCpayable",message:ws,choices:[{title:"No",value:!1},{title:"Yes",value:!0}]},{type:"select",name:"nftSCpayableBySc",message:hs,choices:[{title:"Yes",value:!0},{title:"No",value:!1}]},{type:"text",name:"deployNftMinterImgCid",message:ae,validate:s=>s?!0:"Required!"},{type:"text",name:"deployNftMinterMetaCid",message:ie,validate:s=>s?!0:"Required!"},{type:"select",name:"metadataInAssets",message:bs,choices:[{title:"No",value:!1},{title:"Yes",value:!0}]},{type:"select",name:"deployNftMinterImgExt",message:cs,choices:[{title:".png",value:".png"},{title:".jpg",value:".jpg"},{title:".jpeg",value:".jpeg"},{title:".gif",value:".gif"},{title:".mp3",value:".mp3"},{title:".mp4",value:".mp4"},{title:".acc",value:".acc"},{title:".flac",value:".flac"},{title:".m4a",value:".m4a"},{title:".wav",value:".wav"},{title:".mov",value:".mov"},{title:".quicktime",value:".quicktime"},{title:".webm",value:".webm"}]},{type:"number",name:"deployNftMinterAmountOfTokens",message:ss,min:1,validate:s=>!s||s<1?"Required and min 1!":!0},{type:"text",name:"deployNftMinterSellingPrice",message:ce,validate:s=>!Number(s)||Number(s)<=0?"Required and min 0!":!0},{type:"number",name:"deployNftMinterTokensLimitPerAddress",message:le,validate:s=>s&&s>=1?!0:"Min 1!"},{type:"number",name:"deployNftMinterRoyalties",message:os,min:0,max:100,float:!0,round:2,validate:s=>s>=0&&s<=100||!s?!0:"Should be a number in range 0-100"},{type:"text",name:"deployNftMinterTags",message:as},{type:"text",name:"deployNftMinterProvenanceHash",message:is}],t=oa("Processing the transaction...");try{let{scWasmCode:s,smartContract:o,userAccount:a,signer:i,provider:c}=yield T(),{deployNftMinterImgCid:l,deployNftMinterImgExt:g,deployNftMinterMetaCid:m,deployNftMinterAmountOfTokens:f,deployNftMinterTokensLimitPerAddress:S,deployNftMinterSellingPrice:h,deployNftMinterRoyalties:v,deployNftMinterTags:P,deployNftMinterProvenanceHash:E,nftSCupgradable:N,nftSCreadable:p,nftSCpayable:M,nftSCpayableBySc:G,metadataInAssets:we}=yield aa(e);yield k(),(!l||!m||!f||!h)&&(console.log("You have to provide CIDs, amount of tokens and selling price!"),Pe(9));let F=Vs(s,o,er,l,g,m,f,S,h,v,P,E,N,p,M,G,we);F.setNonce(a.nonce),a.incrementNonce(),i.sign(F),t.start();let ne=ca.computeAddress(F.getSender(),F.getNonce());o.setAddress(ne),yield c.sendTransaction(F);let re=yield new ia(c).awaitCompleted(F),U=re.status,Oo=re.hash;t.stop(),console.log(` | ||
Deployment transaction executed: ${U}`),console.log(`Deployment tx: ${oe[u]}/transactions/${Oo} | ||
`),console.log(`Smart Contract address: ${ne} | ||
`),ge({scAddress:ne,sellingPrice:h})}catch(s){t.stop(),console.log(s==null?void 0:s.message)}}),No=n=>d(void 0,null,function*(){let e={nftMinter:"nft-minter"};(n==="-h"||n==="--help")&&(console.log(`======================== | ||
`,Ss=`Provide the collection ticker | ||
`,vs=`Do you want to exclude smart contract addresses? | ||
`,ks=`Do you want to filter by metadata JSON file name? Provide names without the extension separated by a comma (example: 123,555,9999) [you can ommit that, just confirm empty] | ||
`,Ps=`Please provide the project name (directory name) in which the dapp should be initialized. | ||
`,Ms=`Provide address to remove. | ||
`,Ls="walletKey.pem",Fs="sc/nft-minter/elven-nft-minter.abi.json",Ds="sc/nft-minter/elven-nft-minter.wasm",Os=`https://raw.githubusercontent.com/ElvenTools/elven-nft-minter-sc/${sr}/output/elven-nft-minter.abi.json`,Es=`https://raw.githubusercontent.com/ElvenTools/elven-nft-minter-sc/${sr}/output/elven-nft-minter.wasm`,Ae=`https://github.com/ElvenTools/elven-tools-dapp/archive/refs/tags/${Ho}.zip`,Q="output.json",Cs="allowlist.json",Rs="giveaway.json";import{SmartContract as me,Account as zo,SmartContractAbi as Is,Code as js,AbiRegistry as $s,Address as L,ContractFunction as x,BytesValue as I,TokenPayment as O,U32Value as q,BigUIntValue as xe,AddressValue as H,Transaction as ee,TransactionPayload as Bs,CodeMetadata as Wo,BooleanValue as _o,List as Us,ListType as Qs,AddressType as qs,TransactionWatcher as te,ESDTTransferPayloadBuilder as Zo,ESDTNFTTransferPayloadBuilder as Ys}from"@elrondnetwork/erdjs";import Ks from"axios";import{parseUserKey as Xo,UserSigner as ea}from"@elrondnetwork/erdjs-walletcore";import{ApiNetworkProvider as ta,ProxyNetworkProvider as na}from"@elrondnetwork/erdjs-network-providers";import ra from"prompts";import Se from"bignumber.js";import Js from"ora";import{readFileSync as Vs,accessSync as pe,constants as $,writeFileSync as Gs,promises as Hs}from"fs";import{exit as ue,cwd as sa}from"process";var ge=sa(),E=(r,e)=>{let t=(e==null?void 0:e.isJSON)===void 0?!0:e.isJSON,s=(e==null?void 0:e.noExitOnError)===void 0?!1:e.noExitOnError,o=`${ge}/${r}`;try{pe(o,$.R_OK|$.W_OK)}catch(c){if(!s)console.error(`There is no ${r}!`),ue(9);else return}let i=Vs(o).toString("utf8");return t?JSON.parse(i):i};var ve=()=>J?new na(ns[g],{timeout:1e4}):new ta(j[g],{timeout:1e4}),zs=(r,e)=>new me({address:e?new L(e):void 0,abi:r}),Ws=r=>d(void 0,null,function*(){let t=Xo(r).generatePublicKey().toAddress();return new zo(t)}),_s=r=>ea.fromPem(r),Zs=(r,e)=>d(void 0,null,function*(){try{pe(r,$.R_OK|$.W_OK);let t=yield Hs.readFile(r,{encoding:"utf8"}),s=JSON.parse(t),o=$s.create(s);return new Is(o)}catch(t){let s=yield Ks.get(e),o=$s.create(s.data);return new Is(o)}}),Xs=(r,e)=>d(void 0,null,function*(){try{pe(r,$.R_OK|$.W_OK);let t=yield Hs.readFile(r);return js.fromBuffer(t)}catch(t){let s=yield Ks.get(e,{responseType:"arraybuffer",transformResponse:[],headers:{Accept:"application/wasm"}}),o=Buffer.from(s.data);return js.fromBuffer(o)}}),eo=(r,e,t,s,o,a,i,c,l,p,u,f,b=!0,h=!1,k=!1,P=!0,C=!1)=>e.deploy({code:r,codeMetadata:new Wo(b,h,k,P),gasLimit:t,initArguments:[I.fromUTF8(s.trim()),I.fromUTF8(a.trim()),new q(i),new q(c),new xe(new Se(Number(p)*100||0)),new xe(O.egldFromAmount(l.trim()).valueOf()),I.fromUTF8(o.trim()),I.fromUTF8((u==null?void 0:u.trim())||""),I.fromUTF8((f==null?void 0:f.trim())||""),new _o(C)],chainID:w[g]}),fe=({scAddress:r,sellingPrice:e,tokenId:t})=>{let s=`${ge}/${Q}`;try{pe(s,$.R_OK|$.W_OK);let o=Vs(s,{encoding:"utf8"}),a=R(R(R(R({},JSON.parse(o)),r?{nftMinterScAddress:r.bech32()}:{}),e?{nftMinterScCollectionSellingPrice:O.egldFromAmount(e).toString()}:{}),t?{nftMinterCollectionToken:t}:{});return Gs(s,JSON.stringify(a,null,2))}catch(o){return Gs(s,JSON.stringify(R(R(R({},r?{nftMinterScAddress:r.bech32()}:{}),e?{nftMinterScCollectionSellingPrice:O.egldFromAmount(e).toString()}:{}),t?{nftMinterCollectionToken:t}:{}),null,2))}},to=(r,e,t,s,o,a)=>r.call({func:new x(cr),args:[I.fromUTF8(s.trim()),I.fromUTF8(o.trim()),...a?[I.fromUTF8(a.trim())]:[]],value:O.egldFromAmount(t),gasLimit:e,chainID:w[g]}),y=()=>{let r=E(Q,{noExitOnError:!0}),e=nr||(r==null?void 0:r.nftMinterScAddress);return e||(console.log("Smart Contract address isn't provided. Please deploy it or add the address to the configuration if it is already deployed."),ue(9)),e},no=(r,e)=>r.call({func:new x(lr),gasLimit:e,chainID:w[g]}),ro=(r,e,t)=>{let s=t||1,o=E(Q,{noExitOnError:!0}),a=mr||(o==null?void 0:o.nftMinterScCollectionSellingPrice);if(!a)console.log("Price per token isn't provided. Please add it to the config file."),ue(9);else{let i=new me({address:new L(r)}),c=new Se(a).times(s);return i.call({func:new x(pr),gasLimit:e+e/2*(t-1),chainID:w[g],args:[new q(s)],value:O.egldFromBigInteger(c)})}},so=(r,e,t,s)=>{let o=()=>new Us(new Qs(new qs),t.map(c=>new H(new L(c)))),a=s||1,i=t.length*a;return r.call({func:new x(gr),gasLimit:e+e/2*(i-1),chainID:w[g],args:[o(),new q(a)]})},oo=(r,e,t,s)=>r.call({func:new x(fr),gasLimit:e,chainID:w[g],args:[new q(t),...s?[new q(s)]:[]]}),ao=(r,e)=>r.call({func:new x(wr),gasLimit:e,chainID:w[g]}),io=(r,e)=>r.call({func:new x(hr),gasLimit:e,chainID:w[g]}),co=(r,e)=>r.call({func:new x(yr),gasLimit:e,chainID:w[g]}),lo=(r,e)=>r.call({func:new x(Hr),gasLimit:e,chainID:w[g]}),mo=(r,e)=>r.call({func:new x(zr),gasLimit:e,chainID:w[g]}),T=(r,e,t,s)=>d(void 0,null,function*(){r.setNonce(e.nonce),e.incrementNonce(),t.sign(r);let o=Js("Processing the transaction...");o.start(),yield s.sendTransaction(r);let i=yield new te(s).awaitCompleted(r),c=i.hash,l=i.status;o.stop(),console.log(` | ||
Transaction status: ${l}`),console.log(`Transaction link: ${ae[g]}/transactions/${c} | ||
`)}),po=(r,e,t)=>r.call({func:new x(Tr),gasLimit:e,chainID:w[g],args:[new xe(O.egldFromAmount(t.trim()).valueOf())]}),oa=[{type:"select",name:"areYouSureAnswer",message:ws,choices:[{title:"Yes",value:"yes"},{title:"No",value:"no"}]}],S=()=>d(void 0,null,function*(){let{areYouSureAnswer:r}=yield ra(oa);r!=="yes"&&(console.log("Aborted!"),ue(9))}),uo=(r,e)=>new ee({data:new Bs("ClaimDeveloperRewards"),gasLimit:6e6,chainID:w[g],sender:e.address,receiver:r.getAddress(),value:O.egldFromAmount(0)}),go=(r,e)=>new me({address:new L(r)}).call({func:new x(Nr),gasLimit:e,chainID:w[g],args:[]}),ke=(r,e,t,s=[])=>{let a=new me({address:new L(e)}).createQuery({func:new x(r),args:s});return t.queryContract(a)},aa=r=>{var t,s;return((s=(t=r.getReturnDataParts())==null?void 0:t[0])==null?void 0:s.toString("hex"))==="01"?"true":"false"},Pe=r=>{var t,s;let e=(s=(t=r.getReturnDataParts())==null?void 0:t[0])==null?void 0:s.toString("hex");return new Se(e,16).toString(10)},ia=r=>{var t,s;return(s=(t=r.getReturnDataParts())==null?void 0:t[0])==null?void 0:s.toString("utf8")},v=a=>d(void 0,[a],function*({functionName:r,resultLabel:e,resultType:t,resultModifier:s,args:o}){let i=y(),c=Js("Processing query...");try{let l=ve();c.start();let p=yield ke(r,i,l,o);c.stop();let u;t==="string"?u=ia(p):t==="boolean"?u=aa(p):u=Pe(p),s==null||s(u.trim()),console.log(`${e||"Query results:"} `,s?s(u.trim()):u.trim())}catch(l){c.stop(),console.log(l==null?void 0:l.message)}}),fo=r=>{v({functionName:Dr,resultLabel:"Tokens already minted per address:",resultType:"number",args:[new H(new L(r))]})},wo=r=>{v({functionName:$r,resultLabel:"Tokens already minted per address per drop:",resultType:"number",args:[new H(new L(r))]})},ho=r=>{v({functionName:Vr,resultType:"boolean",resultLabel:"Result:",resultModifier:e=>e==="true"?"Provided address is included!":"Provided address isn't included!",args:[new H(new L(r))]})},yo=(r,e,t,s)=>r.call({func:new x(Or),gasLimit:e,chainID:w[g],args:[I.fromUTF8(t.trim()),I.fromUTF8(s.trim())]}),bo=(r,e,t)=>r.call({func:new x(Cr),gasLimit:e,chainID:w[g],args:[new q(t)]}),To=(r,e)=>r.call({func:new x(Ir),gasLimit:e,chainID:w[g]}),No=(r,e,t)=>{let s=()=>new Us(new Qs(new qs),t.map(o=>new H(new L(o))));return r.call({func:new x(Br),gasLimit:e+185e4*(t.length-1),chainID:w[g],args:[s()]})},Ao=(r,e,t)=>r.call({func:new x(Qr),gasLimit:e+445e3*(t-1),chainID:w[g]}),xo=(r,e,t)=>r.call({func:new x(Yr),gasLimit:e,chainID:w[g],args:[new H(new L(t))]}),So=(r,e,t,s,o)=>d(void 0,null,function*(){let a=O.egldFromAmount(r),i=s.getAddress(),c=new Bs("EGLD distribution made by Elven Tools CLI"),l=new ee({data:c,gasLimit:5e4+1500*c.length(),sender:i,receiver:new L(e.trim()),value:a,chainID:w[g]});l.setNonce(t.nonce),t.incrementNonce(),s.sign(l);try{yield o.sendTransaction(l);let f=(yield new te(o).awaitCompleted(l)).hash,b=yield o.getTransactionStatus(f);return{receiverAddress:e,txHash:f,txStatus:b.status}}catch(p){return console.log(JSON.stringify(p)),{receiverAddress:e,txHash:"",txStatus:"failed"}}}),vo=(r,e,t,s,o,a,i)=>d(void 0,null,function*(){let c=O.fungibleFromAmount(a,r,i),l=new Zo().setPayment(c).build(),p=s.getAddress(),u=new ee({data:l,gasLimit:5e4+1500*l.length()+3e5,sender:p,receiver:new L(e.trim()),chainID:w[g]});u.setNonce(t.nonce),t.incrementNonce(),s.sign(u);try{yield o.sendTransaction(u);let h=(yield new te(o).awaitCompleted(u)).hash,k=yield o.getTransactionStatus(h);return{receiverAddress:e,txHash:h,txStatus:k.status}}catch(f){return console.log(JSON.stringify(f)),{receiverAddress:e,txHash:"",txStatus:"failed"}}}),ko=(r,e,t,s,o,a,i,c)=>d(void 0,null,function*(){let l=O.metaEsdtFromAmount(i,c,r,a),p=new Ys().setPayment(l).setDestination(new L(e.trim())).build(),u=s.getAddress(),f=new ee({nonce:c,data:p,gasLimit:5e4+1500*p.length()+3e5,sender:u,receiver:u,chainID:w[g]});f.setNonce(t.nonce),t.incrementNonce(),s.sign(f);try{yield o.sendTransaction(f);let k=(yield new te(o).awaitCompleted(f)).hash,P=yield o.getTransactionStatus(k);return{receiverAddress:e,txHash:k,txStatus:P.status}}catch(b){return console.log(JSON.stringify(b)),{receiverAddress:e,txHash:"",txStatus:"failed"}}}),Po=(r,e,t,s,o,a,i)=>d(void 0,null,function*(){let c=O.semiFungible(a,i,Number(r)),l=new Ys().setPayment(c).setDestination(new L(e.trim())).build(),p=s.getAddress(),u=new ee({nonce:i,data:l,gasLimit:5e4+1500*l.length()+3e5,sender:p,receiver:p,chainID:w[g]});u.setNonce(t.nonce),t.incrementNonce(),s.sign(u);try{yield o.sendTransaction(u);let h=(yield new te(o).awaitCompleted(u)).hash,k=yield o.getTransactionStatus(h);return{receiverAddress:e,txHash:h,txStatus:k.status}}catch(f){return console.log(JSON.stringify(f)),{receiverAddress:e,txHash:"",txStatus:"failed"}}});var z=()=>d(void 0,null,function*(){let r=E(Ls,{isJSON:!1}),e=ve(),t=yield Ws(r),s=yield e.getAccount(t.address);return t.update(s),{signer:_s(r),userAccount:t,provider:e}}),N=r=>d(void 0,null,function*(){let e=yield Zs(Fs,Os),t=yield Xs(Ds,Es),s=zs(e,r),o=yield z();return R({scWasmCode:t,smartContract:s},o)});import{TransactionWatcher as ma,SmartContract as pa}from"@elrondnetwork/erdjs";var ua=()=>d(void 0,null,function*(){E(Q,{noExitOnError:!0})&&ca(`${ge}/${Q}`);let e=[{type:"select",name:"nftSCupgradable",message:hs,choices:[{title:"Yes",value:!0},{title:"No",value:!1}]},{type:"select",name:"nftSCreadable",message:ys,choices:[{title:"No",value:!1},{title:"Yes",value:!0}]},{type:"select",name:"nftSCpayable",message:bs,choices:[{title:"No",value:!1},{title:"Yes",value:!0}]},{type:"select",name:"nftSCpayableBySc",message:Ts,choices:[{title:"Yes",value:!0},{title:"No",value:!1}]},{type:"text",name:"deployNftMinterImgCid",message:ie,validate:s=>s?!0:"Required!"},{type:"text",name:"deployNftMinterMetaCid",message:ce,validate:s=>s?!0:"Required!"},{type:"select",name:"metadataInAssets",message:As,choices:[{title:"No",value:!1},{title:"Yes",value:!0}]},{type:"select",name:"deployNftMinterImgExt",message:ms,choices:[{title:".png",value:".png"},{title:".jpg",value:".jpg"},{title:".jpeg",value:".jpeg"},{title:".gif",value:".gif"},{title:".mp3",value:".mp3"},{title:".mp4",value:".mp4"},{title:".acc",value:".acc"},{title:".flac",value:".flac"},{title:".m4a",value:".m4a"},{title:".wav",value:".wav"},{title:".mov",value:".mov"},{title:".quicktime",value:".quicktime"},{title:".webm",value:".webm"}]},{type:"number",name:"deployNftMinterAmountOfTokens",message:is,min:1,validate:s=>!s||s<1?"Required and min 1!":!0},{type:"text",name:"deployNftMinterSellingPrice",message:le,validate:s=>!Number(s)||Number(s)<=0?"Required and min 0!":!0},{type:"number",name:"deployNftMinterTokensLimitPerAddress",message:de,validate:s=>s&&s>=1?!0:"Min 1!"},{type:"number",name:"deployNftMinterRoyalties",message:cs,min:0,max:100,float:!0,round:2,validate:s=>s>=0&&s<=100||!s?!0:"Should be a number in range 0-100"},{type:"text",name:"deployNftMinterTags",message:ls},{type:"text",name:"deployNftMinterProvenanceHash",message:ds}],t=la("Processing the transaction...");try{let{scWasmCode:s,smartContract:o,userAccount:a,signer:i,provider:c}=yield N(),{deployNftMinterImgCid:l,deployNftMinterImgExt:p,deployNftMinterMetaCid:u,deployNftMinterAmountOfTokens:f,deployNftMinterTokensLimitPerAddress:b,deployNftMinterSellingPrice:h,deployNftMinterRoyalties:k,deployNftMinterTags:P,deployNftMinterProvenanceHash:C,nftSCupgradable:A,nftSCreadable:m,nftSCpayable:M,nftSCpayableBySc:B,metadataInAssets:he}=yield da(e);yield S(),(!l||!u||!f||!h)&&(console.log("You have to provide CIDs, amount of tokens and selling price!"),Me(9));let F=eo(s,o,rr,l,p,u,f,b,h,k,P,C,A,m,M,B,he);F.setNonce(a.nonce),a.incrementNonce(),i.sign(F),t.start();let re=pa.computeAddress(F.getSender(),F.getNonce());o.setAddress(re),yield c.sendTransaction(F);let se=yield new ma(c).awaitCompleted(F),U=se.status,Go=se.hash;t.stop(),console.log(` | ||
Deployment transaction executed: ${U}`),console.log(`Deployment tx: ${ae[g]}/transactions/${Go} | ||
`),console.log(`Smart Contract address: ${re} | ||
`),fe({scAddress:re,sellingPrice:h})}catch(s){t.stop(),console.log(s==null?void 0:s.message)}}),Mo=r=>d(void 0,null,function*(){let e={nftMinter:"nft-minter"};(r==="-h"||r==="--help")&&(console.log(`======================== | ||
Available commands: | ||
======================== | ||
${Object.values(e).join(` | ||
`)}`),Pe(9)),(!n||!Object.values(e).includes(n))&&(console.log(`=========================================================== | ||
`)}`),Me(9)),(!r||!Object.values(e).includes(r))&&(console.log(`=========================================================== | ||
Plaese provide a proper deploy command. Available commands: | ||
=========================================================== | ||
${Object.values(e).join(` | ||
`)}`),Pe(9)),n===e.nftMinter&&la()});import{Address as da}from"@elrondnetwork/erdjs";import Ao from"cross-fetch";import{Buffer as pa}from"buffer";import ma from"fs";import{exit as Me,cwd as ua}from"process";import ga from"ora";import fa from"p-throttle";import wa from"prompts";var Le=100,Fe=ga("Processing, please wait..."),ha=n=>{var s,o,a;let e=n?pa.from(n,"base64").toString():void 0;if(!e)return"";let t=(s=e.split(";").filter(i=>i.includes("metadata")))==null?void 0:s[0];return t?(a=(o=t.split("/"))==null?void 0:o[1].split("."))==null?void 0:a[0]:""},xo=()=>d(void 0,null,function*(){let n="",e=[{type:"text",name:"collectionTicker",message:Ns,validate:t=>t?!0:"Required!"},{type:"select",name:"noSmartContracts",message:As,choices:[{title:"Yes",value:!0},{title:"No",value:!1}]},{type:"list",name:"fileNamesList",message:xs}];try{let{collectionTicker:t,noSmartContracts:s,fileNamesList:o}=yield wa(e);t||(console.log("You have to provide CIDs, amount of tokens and selling price!"),Me(9));let a=[];n=yield(yield Ao(`${j[u]}/collections/${t}/nfts/count`)).text(),console.log(`There are ${n} tokens in that collection.`),Number(n)===0&&(console.log(` | ||
`)}`),Me(9)),r===e.nftMinter&&ua()});import{Address as ga}from"@elrondnetwork/erdjs";import Lo from"cross-fetch";import{Buffer as fa}from"buffer";import wa from"fs";import{exit as Le,cwd as ha}from"process";import ya from"ora";import ba from"p-throttle";import Ta from"prompts";var Fe=100,De=ya("Processing, please wait..."),Na=r=>{var s,o,a;let e=r?fa.from(r,"base64").toString():void 0;if(!e)return"";let t=(s=e.split(";").filter(i=>i.includes("metadata")))==null?void 0:s[0];return t?(a=(o=t.split("/"))==null?void 0:o[1].split("."))==null?void 0:a[0]:""},Fo=()=>d(void 0,null,function*(){let r="",e=[{type:"text",name:"collectionTicker",message:Ss,validate:t=>t?!0:"Required!"},{type:"select",name:"noSmartContracts",message:vs,choices:[{title:"Yes",value:!0},{title:"No",value:!1}]},{type:"list",name:"fileNamesList",message:ks}];try{let{collectionTicker:t,noSmartContracts:s,fileNamesList:o}=yield Ta(e);t||(console.log("You have to provide CIDs, amount of tokens and selling price!"),Le(9));let a=[];r=yield(yield Lo(`${j[g]}/collections/${t}/nfts/count`)).text(),console.log(`There are ${r} tokens in that collection.`),Number(r)===0&&(console.log(` | ||
There are no tokens. Please check if you configured the proper chain. By default, it will be the devnet. You can change it using the .elventoolsrc configuration file. | ||
`),Me(9)),Fe.start();let l=yield(()=>new Promise(N=>{let p=Math.ceil(Number(n)/Le),M=fa({limit:_r,interval:1e3}),G=0,we=M(F=>d(void 0,null,function*(){let re=(yield(yield Ao(`${j[u]}/collections/${t}/nfts?withOwner=true&from=${F*Le}&size=${Le}`)).json()).map(U=>({owner:U.owner,identifier:U.identifier,metadataFileName:ha(U.attributes)}));if(F>=Math.ceil(p/2)&&(Fe.text="Almost there..."),a.push(re),G>=p-1){Fe.stop();let U=a.flat();return N(U)}G<p&&G++}));for(let F=0;F<p;F++)d(void 0,null,function*(){return we(F)})}))();s&&(l=l.filter(N=>typeof N.owner=="string"&&!da.fromString(N.owner).isContractAddress()));let g=l.length,m="";g===0&&(console.log("No addresses found!"),Me(9));let f=(N,p,M)=>M.findIndex(G=>G.owner===N.owner)===p,S=l.filter(f),h=N=>l.filter(p=>p.owner===N.owner).map(p=>({identifier:p.identifier,metadataFileName:p.metadataFileName})),P=S.map(N=>{let p=h(N);return{owner:N.owner,tokens:p,tokensCount:p.length}}).sort((N,p)=>p.tokensCount-N.tokensCount),E=P;o!=null&&o[0]&&(E=P.filter(N=>o.some(p=>N.tokens.findIndex(M=>M.metadataFileName===p)>-1))),E&&ma.writeFileSync(`${ua()}/nft-collection-owners.json`,JSON.stringify(E,null,2),"utf8"),s&&(m=`${s?" Without smart contract addresses.":""}`),console.log(`Done, ${E.length} addresses saved.${m}`),console.log("Check the nft-collection-owners.json file"),console.log(`You can also export them to CSV using: | ||
https://github.com/ElvenTools/elven-tools-collection-owners-csv`)}catch(t){console.log(t==null?void 0:t.message)}});import ya from"fs";import{Mnemonic as ba}from"@elrondnetwork/erdjs-walletcore";import Ta from"prompts";import{exit as De}from"process";var So=()=>d(void 0,null,function*(){let n=[{type:"text",name:"seed",message:es,validate:e=>e?!0:"Required!"}];try{let{seed:e}=yield Ta(n);e||(console.log("You have to provide the seed phrase value!"),De());let s=ba.fromString(e).deriveKey(),o=s.hex(),a=s.generatePublicKey().hex(),i=Buffer.from(o+a).toString("base64"),c=s.generatePublicKey().toAddress().bech32(),l=`-----BEGIN PRIVATE KEY for ${c}-----`,g=`-----END PRIVATE KEY for ${c}-----`,m=`${l} | ||
`),Le(9)),De.start();let l=yield(()=>new Promise(A=>{let m=Math.ceil(Number(r)/Fe),M=ba({limit:es,interval:1e3}),B=0,he=M(F=>d(void 0,null,function*(){let se=(yield(yield Lo(`${j[g]}/collections/${t}/nfts?withOwner=true&from=${F*Fe}&size=${Fe}`)).json()).map(U=>({owner:U.owner,identifier:U.identifier,metadataFileName:Na(U.attributes)}));if(F>=Math.ceil(m/2)&&(De.text="Almost there..."),a.push(se),B>=m-1){De.stop();let U=a.flat();return A(U)}B<m&&B++}));for(let F=0;F<m;F++)d(void 0,null,function*(){return he(F)})}))();s&&(l=l.filter(A=>typeof A.owner=="string"&&!ga.fromString(A.owner).isContractAddress()));let p=l.length,u="";p===0&&(console.log("No addresses found!"),Le(9));let f=(A,m,M)=>M.findIndex(B=>B.owner===A.owner)===m,b=l.filter(f),h=A=>l.filter(m=>m.owner===A.owner).map(m=>({identifier:m.identifier,metadataFileName:m.metadataFileName})),P=b.map(A=>{let m=h(A);return{owner:A.owner,tokens:m,tokensCount:m.length}}).sort((A,m)=>m.tokensCount-A.tokensCount),C=P;o!=null&&o[0]&&(C=P.filter(A=>o.some(m=>A.tokens.findIndex(M=>M.metadataFileName===m)>-1))),C&&wa.writeFileSync(`${ha()}/nft-collection-owners.json`,JSON.stringify(C,null,2),"utf8"),s&&(u=`${s?" Without smart contract addresses.":""}`),console.log(`Done, ${C.length} addresses saved.${u}`),console.log("Check the nft-collection-owners.json file"),console.log(`You can also export them to CSV using: | ||
https://github.com/ElvenTools/elven-tools-collection-owners-csv`)}catch(t){console.log(t==null?void 0:t.message)}});import Aa from"fs";import{Mnemonic as xa}from"@elrondnetwork/erdjs-walletcore";import Sa from"prompts";import{exit as Oe}from"process";var Do=()=>d(void 0,null,function*(){let r=[{type:"text",name:"seed",message:rs,validate:e=>e?!0:"Required!"}];try{let{seed:e}=yield Sa(r);e||(console.log("You have to provide the seed phrase value!"),Oe());let s=xa.fromString(e).deriveKey(),o=s.hex(),a=s.generatePublicKey().hex(),i=Buffer.from(o+a).toString("base64"),c=s.generatePublicKey().toAddress().bech32(),l=`-----BEGIN PRIVATE KEY for ${c}-----`,p=`-----END PRIVATE KEY for ${c}-----`,u=`${l} | ||
${i.replace(/([^\n]{1,64})/g,`$1 | ||
`)}${g}`;ya.writeFileSync("walletKey.pem",m),console.log("File saved as walletKey.pem"),De()}catch(e){console.log(e.message),De()}});import Na from"ora";import D from"prompts";import{exit as te}from"process";var Aa=()=>d(void 0,null,function*(){let n=y(),e=[{type:"text",name:"tokenName",message:ts,validate:s=>s?s.length>20||s.length<3?"Length between 3 and 20 characters!":new RegExp(/^[a-zA-Z0-9]+$/).test(s)?!0:"Alphanumeric characters only!":"Required!"},{type:"text",name:"tokenTicker",message:ns,validate:s=>s?s.length>10||s.length<3?"Length between 3 and 10 characters!":new RegExp(/^[A-Z0-9]+$/).test(s)?!0:"Alphanumeric UPPERCASE only!":"Required!"},{type:"text",name:"nftTokenName",message:rs}],t=Na("Processing the transaction...");try{let{tokenName:s,tokenTicker:o,nftTokenName:a}=yield D(e);(!s||!o)&&(console.log("You have to provide the token name and ticker value!"),te(9));let{smartContract:i,userAccount:c,signer:l,provider:g}=yield T(n),m=Hs(i,nr,rr,s,o,a);yield b(m,c,l,g)}catch(s){t.stop(),console.log(s==null?void 0:s.message)}}),xa=()=>d(void 0,null,function*(){let n=y();try{let{smartContract:e,userAccount:t,signer:s,provider:o}=yield T(n),a=zs(e,sr);yield b(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Sa=()=>d(void 0,null,function*(){let n=y(),e=[{type:"number",name:"tokensAmount",message:ls,validate:t=>t&&t>0&&t<=Q?!0:`Required a number greater than 0 and lower than ${Q} because of the max gas limits!`}];try{let{tokensAmount:t}=yield D(e);yield k();let{userAccount:s,signer:o,provider:a}=yield W(),i=Ws(n,ir,Number(t));yield b(i,s,o,a)}catch(t){console.log(t==null?void 0:t.message)}}),va=()=>d(void 0,null,function*(){let n=y(),e=[{type:"text",name:"giveawayAddress",message:ds,validate:t=>t?!0:"Required!"},{type:"number",name:"giveawayTokensAmount",message:ps,validate:t=>t&&t>0&&t<=Q?!0:`Required a number greater than 0 and lower than ${Q} because of the max gas limits!`}];try{let{giveawayAddress:t,giveawayTokensAmount:s}=yield D(e);t||(console.log("You have to provide the give away address!"),te(9)),yield k();let{smartContract:o,userAccount:a,signer:i,provider:c}=yield T(n),l=_s(o,dr,t,Number(s));yield b(l,a,i,c)}catch(t){console.log(t==null?void 0:t.message)}}),ka=()=>d(void 0,null,function*(){let n=[{type:"number",name:"dropTokensAmount",message:ms,validate:t=>t?!0:"Required!"},{type:"number",name:"dropTokensLimitPerAddressPerDrop",message:ys}],e=y();try{let{dropTokensAmount:t,dropTokensLimitPerAddressPerDrop:s}=yield D(n),{smartContract:o,userAccount:a,signer:i,provider:c}=yield T(e),l=Zs(o,he,t,s);yield b(l,a,i,c)}catch(t){console.log(t==null?void 0:t.message)}}),Pa=()=>d(void 0,null,function*(){let n=y();try{let{smartContract:e,userAccount:t,signer:s,provider:o}=yield T(n),a=Xs(e,he);yield b(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ma=()=>d(void 0,null,function*(){let n=y();try{yield k();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield T(n),a=eo(e,ye);yield b(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),La=()=>d(void 0,null,function*(){let n=y();try{yield k();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield T(n),a=to(e,ye);yield b(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Fa=()=>d(void 0,null,function*(){let n=[{type:"text",name:"newPrice",message:ce,validate:t=>!Number(t)||Number(t)<=0?"Required and min 0!":!0}],e=y();try{let{newPrice:t}=yield D(n);yield k();let{smartContract:s,userAccount:o,signer:a,provider:i}=yield T(e),c=so(s,wr,t);yield b(c,o,a,i),ge({sellingPrice:t})}catch(t){console.log(t==null?void 0:t.message)}}),Da=()=>d(void 0,null,function*(){let n=y();try{let{smartContract:e,userAccount:t,signer:s,provider:o}=yield T(n),a=oo(e,t);yield b(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Oa=()=>d(void 0,null,function*(){let n=y();try{let{userAccount:e,signer:t,provider:s}=yield W(),o=ao(n,br);yield b(o,e,t,s)}catch(e){console.log(e==null?void 0:e.message)}}),Ea=()=>d(void 0,null,function*(){let n=[{type:"text",name:"nftMinterImgCid",message:ae,validate:t=>t?!0:"Required!"},{type:"text",name:"nftMinterMetaCid",message:ie,validate:t=>t?!0:"Required!"}],e=y();try{let{nftMinterImgCid:t,nftMinterMetaCid:s}=yield D(n);yield k();let{smartContract:o,userAccount:a,signer:i,provider:c}=yield T(e),l=po(o,Fr,t,s);yield b(l,a,i,c)}catch(t){console.log(t==null?void 0:t.message)}}),Ca=()=>d(void 0,null,function*(){let n=[{type:"number",name:"nftMinterTokensLimitPerAddress",message:le,validate:t=>t&&t>=1?!0:"Minimum 1!"}],e=y();try{let{nftMinterTokensLimitPerAddress:t}=yield D(n);yield k();let{smartContract:s,userAccount:o,signer:a,provider:i}=yield T(e),c=mo(s,Or,t);yield b(c,o,a,i)}catch(t){console.log(t==null?void 0:t.message)}}),Ra=()=>d(void 0,null,function*(){let n=y();try{yield k();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield T(n),a=no(e,Te);yield b(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ia=()=>d(void 0,null,function*(){let n=y();try{yield k();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield T(n),a=ro(e,Te);yield b(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),ja=()=>d(void 0,null,function*(){let n=[{type:"text",name:"address",message:`Provide the address: | ||
`,validate:e=>e?!0:"Required!"}];try{let{address:e}=yield D(n);io(e)}catch(e){console.log(e==null?void 0:e.message)}}),$a=()=>d(void 0,null,function*(){let n=[{type:"text",name:"address",message:`Provide the address: | ||
`,validate:e=>e?!0:"Required!"}];try{let{address:e}=yield D(n);co(e)}catch(e){console.log(e==null?void 0:e.message)}}),Ba=()=>d(void 0,null,function*(){let n=y();try{let{smartContract:e,userAccount:t,signer:s,provider:o}=yield T(n),a=uo(e,Cr);yield b(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ga=()=>d(void 0,null,function*(){let n=y(),e=[{type:"list",name:"addressesList",message:Ts,validate:t=>t&&t.length>0?!0:"Required at least one address!"}];try{let{smartContract:t,userAccount:s,signer:o,provider:a}=yield T(n),i=I(Ds,{noExitOnError:!0}),c=[];if(i)console.log(" "),console.log(`Populating addresses from the file: allowlist.json (max ${H} addresses per file/transaction).`),console.log(" "),yield k(),c=i;else{console.log(" "),console.log("There is no allowlist.json file with the addresses."),console.log("You will be providing addresses by hand."),console.log(" "),yield k();let{addressesList:g}=yield D(e);c=g}Array.isArray(c)&&c.length>H&&(console.log(`The amount of addresses is more than ${H}. Please split it into batches with a max of ${H} addresses per transaction.`),te(9));let l=go(t,$r,c);yield b(l,s,o,a)}catch(t){console.log(t==null?void 0:t.message)}}),Ua=()=>d(void 0,null,function*(){let n=y();try{yield k();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield T(n),a=yield ve(be,n,o),i=fo(e,Gr,Number(ke(a)));yield b(i,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Qa=()=>d(void 0,null,function*(){let n=y(),e=[{type:"text",name:"address",message:vs,validate:t=>t?!0:"Required!"}];try{let{address:t}=yield D(e);yield k();let{smartContract:s,userAccount:o,signer:a,provider:i}=yield T(n),c=wo(s,Qr,t);yield b(c,o,a,i)}catch(t){console.log(t==null?void 0:t.message)}}),qa=()=>d(void 0,null,function*(){let n=[{type:"text",name:"address",message:`Provide the address to check if it is included in the allowlist: | ||
`,validate:e=>e?!0:"Required!"}];try{let{address:e}=yield D(n);lo(e)}catch(e){console.log(e==null?void 0:e.message)}}),vo=n=>d(void 0,null,function*(){let e={issueCollectionToken:"issue-collection-token",setLocalRoles:"set-roles",mint:"mint",giveaway:"giveaway",claimScFunds:"claim-sc-funds",setDrop:"set-drop",unsetDrop:"unset-drop",pauseMinting:"pause-minting",startMinting:"start-minting",setNewPrice:"set-new-price",claimDevRewards:"claim-dev-rewards",shuffle:"shuffle",populateAllowlist:"populate-allowlist",clearAllowlist:"clear-allowlist",removeAllowlistAddress:"remove-allowlist-address",enableAllowlist:"enable-allowlist",disableAllowlist:"disable-allowlist",changeBaseCids:"change-base-cids",setNewTokensLimitPerAddress:"set-new-tokens-limit-per-address",getTotalTokensLeft:"get-total-tokens-left",getProvenanceHash:"get-provenance-hash",getDropTokensLeft:"get-drop-tokens-left",getNftPrice:"get-nft-price",getNftTokenId:"get-nft-token-id",getNftTokenName:"get-nft-token-name",getCollectionTokenName:"get-collection-token-name",getTokensLimitPerAddressTotal:"get-tokens-limit-per-address-total",getMintedPerAddressTotal:"get-minted-per-address-total",getMintedPerAddressPerDrop:"get-minted-per-address-per-drop",getTokensLimitPerAddressPerDrop:"get-tokens-limit-per-address-per-drop",getAllowlistSize:"get-allowlist-size",isAllowlistEnabled:"is-allowlist-enabled",getAllowlistAddressCheck:"get-allowlist-address-check",isDropActive:"is-drop-active",isMintingPaused:"is-minting-paused",getTotalSupply:"get-total-supply",getTotalSupplyOfCurrentDrop:"get-total-supply-of-current-drop"};switch((n==="-h"||n==="--help")&&(console.log(`======================== | ||
`)}${p}`;Aa.writeFileSync("walletKey.pem",u),console.log("File saved as walletKey.pem"),Oe()}catch(e){console.log(e.message),Oe()}});import va from"ora";import D from"prompts";import{exit as ne}from"process";var ka=()=>d(void 0,null,function*(){let r=y(),e=[{type:"text",name:"tokenName",message:ss,validate:s=>s?s.length>20||s.length<3?"Length between 3 and 20 characters!":new RegExp(/^[a-zA-Z0-9]+$/).test(s)?!0:"Alphanumeric characters only!":"Required!"},{type:"text",name:"tokenTicker",message:os,validate:s=>s?s.length>10||s.length<3?"Length between 3 and 10 characters!":new RegExp(/^[A-Z0-9]+$/).test(s)?!0:"Alphanumeric UPPERCASE only!":"Required!"},{type:"text",name:"nftTokenName",message:as}],t=va("Processing the transaction...");try{let{tokenName:s,tokenTicker:o,nftTokenName:a}=yield D(e);(!s||!o)&&(console.log("You have to provide the token name and ticker value!"),ne(9));let{smartContract:i,userAccount:c,signer:l,provider:p}=yield N(r),u=to(i,or,ar,s,o,a);yield T(u,c,l,p)}catch(s){t.stop(),console.log(s==null?void 0:s.message)}}),Pa=()=>d(void 0,null,function*(){let r=y();try{let{smartContract:e,userAccount:t,signer:s,provider:o}=yield N(r),a=no(e,ir);yield T(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ma=()=>d(void 0,null,function*(){let r=y(),e=[{type:"number",name:"tokensAmount",message:ps,validate:t=>t&&t>0&&t<=Z?!0:`Required a number greater than 0 and lower than ${Z} because of the max gas limits!`}];try{let{tokensAmount:t}=yield D(e);yield S();let{userAccount:s,signer:o,provider:a}=yield z(),i=ro(r,dr,Number(t));yield T(i,s,o,a)}catch(t){console.log(t==null?void 0:t.message)}}),La=()=>d(void 0,null,function*(){let r=y(),e=[{type:"number",name:"giveawayTokensAmount",message:gs,validate:s=>s&&s>0&&s<=X?!0:`Required a number greater than 0 and lower than ${X} because of the max gas limits!`}],t=[{type:"list",name:"giveawayAddressList",message:us,validate:s=>s&&s.length>0?!0:"Required at least one address!"},...e];try{let{smartContract:s,userAccount:o,signer:a,provider:i}=yield N(r),c=E(Rs,{noExitOnError:!0}),l=[],p=1;if(c){console.log(" "),console.log("Populating addresses from the file: giveaway.json."),console.log(" "),yield S();let{giveawayTokensAmount:f}=yield D(e);l=c,p=f}else{console.log(" "),console.log("There is no giveaway.json file with the addresses."),console.log("You will be providing addresses by hand."),console.log(" "),yield S();let{giveawayAddressList:f,giveawayTokensAmount:b}=yield D(t);l=f,p=b}p*l.length>X&&(console.log(`Total number of tokens to mint is to big (addresses x amountPerAddress). The maximum is: ${Z}`),ne(9));let u=so(s,ur,l,Number(p));yield T(u,o,a,i)}catch(s){console.log(s==null?void 0:s.message)}}),Fa=()=>d(void 0,null,function*(){let r=[{type:"number",name:"dropTokensAmount",message:fs,validate:t=>t?!0:"Required!"},{type:"number",name:"dropTokensLimitPerAddressPerDrop",message:Ns}],e=y();try{let{dropTokensAmount:t,dropTokensLimitPerAddressPerDrop:s}=yield D(r),{smartContract:o,userAccount:a,signer:i,provider:c}=yield N(e),l=oo(o,ye,t,s);yield T(l,a,i,c)}catch(t){console.log(t==null?void 0:t.message)}}),Da=()=>d(void 0,null,function*(){let r=y();try{let{smartContract:e,userAccount:t,signer:s,provider:o}=yield N(r),a=ao(e,ye);yield T(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Oa=()=>d(void 0,null,function*(){let r=y();try{yield S();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield N(r),a=io(e,be);yield T(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ea=()=>d(void 0,null,function*(){let r=y();try{yield S();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield N(r),a=co(e,be);yield T(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ca=()=>d(void 0,null,function*(){let r=[{type:"text",name:"newPrice",message:le,validate:t=>!Number(t)||Number(t)<=0?"Required and min 0!":!0}],e=y();try{let{newPrice:t}=yield D(r);yield S();let{smartContract:s,userAccount:o,signer:a,provider:i}=yield N(e),c=po(s,br,t);yield T(c,o,a,i),fe({sellingPrice:t})}catch(t){console.log(t==null?void 0:t.message)}}),Ra=()=>d(void 0,null,function*(){let r=y();try{let{smartContract:e,userAccount:t,signer:s,provider:o}=yield N(r),a=uo(e,t);yield T(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ia=()=>d(void 0,null,function*(){let r=y();try{let{userAccount:e,signer:t,provider:s}=yield z(),o=go(r,Ar);yield T(o,e,t,s)}catch(e){console.log(e==null?void 0:e.message)}}),ja=()=>d(void 0,null,function*(){let r=[{type:"text",name:"nftMinterImgCid",message:ie,validate:t=>t?!0:"Required!"},{type:"text",name:"nftMinterMetaCid",message:ce,validate:t=>t?!0:"Required!"}],e=y();try{let{nftMinterImgCid:t,nftMinterMetaCid:s}=yield D(r);yield S();let{smartContract:o,userAccount:a,signer:i,provider:c}=yield N(e),l=yo(o,Er,t,s);yield T(l,a,i,c)}catch(t){console.log(t==null?void 0:t.message)}}),$a=()=>d(void 0,null,function*(){let r=[{type:"number",name:"nftMinterTokensLimitPerAddress",message:de,validate:t=>t&&t>=1?!0:"Minimum 1!"}],e=y();try{let{nftMinterTokensLimitPerAddress:t}=yield D(r);yield S();let{smartContract:s,userAccount:o,signer:a,provider:i}=yield N(e),c=bo(s,Rr,t);yield T(c,o,a,i)}catch(t){console.log(t==null?void 0:t.message)}}),Ga=()=>d(void 0,null,function*(){let r=y();try{yield S();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield N(r),a=lo(e,Ne);yield T(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ba=()=>d(void 0,null,function*(){let r=y();try{yield S();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield N(r),a=mo(e,Ne);yield T(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ua=()=>d(void 0,null,function*(){let r=[{type:"text",name:"address",message:`Provide the address: | ||
`,validate:e=>e?!0:"Required!"}];try{let{address:e}=yield D(r);fo(e)}catch(e){console.log(e==null?void 0:e.message)}}),Qa=()=>d(void 0,null,function*(){let r=[{type:"text",name:"address",message:`Provide the address: | ||
`,validate:e=>e?!0:"Required!"}];try{let{address:e}=yield D(r);wo(e)}catch(e){console.log(e==null?void 0:e.message)}}),qa=()=>d(void 0,null,function*(){let r=y();try{let{smartContract:e,userAccount:t,signer:s,provider:o}=yield N(r),a=To(e,jr);yield T(a,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ya=()=>d(void 0,null,function*(){let r=y(),e=[{type:"list",name:"addressesList",message:xs,validate:t=>t&&t.length>0?!0:"Required at least one address!"}];try{let{smartContract:t,userAccount:s,signer:o,provider:a}=yield N(r),i=E(Cs,{noExitOnError:!0}),c=[];if(i)console.log(" "),console.log(`Populating addresses from the file: allowlist.json (max ${V} addresses per file/transaction).`),console.log(" "),yield S(),c=i;else{console.log(" "),console.log("There is no allowlist.json file with the addresses."),console.log("You will be providing addresses by hand."),console.log(" "),yield S();let{addressesList:p}=yield D(e);c=p}Array.isArray(c)&&c.length>V&&(console.log(`The amount of addresses is more than ${V}. Please split it into batches with a max of ${V} addresses per transaction.`),ne(9));let l=No(t,Ur,c);yield T(l,s,o,a)}catch(t){console.log(t==null?void 0:t.message)}}),Ka=()=>d(void 0,null,function*(){let r=y();try{yield S();let{smartContract:e,userAccount:t,signer:s,provider:o}=yield N(r),a=yield ke(Te,r,o),i=Ao(e,qr,Number(Pe(a)));yield T(i,t,s,o)}catch(e){console.log(e==null?void 0:e.message)}}),Ja=()=>d(void 0,null,function*(){let r=y(),e=[{type:"text",name:"address",message:Ms,validate:t=>t?!0:"Required!"}];try{let{address:t}=yield D(e);yield S();let{smartContract:s,userAccount:o,signer:a,provider:i}=yield N(r),c=xo(s,Kr,t);yield T(c,o,a,i)}catch(t){console.log(t==null?void 0:t.message)}}),Va=()=>d(void 0,null,function*(){let r=[{type:"text",name:"address",message:`Provide the address to check if it is included in the allowlist: | ||
`,validate:e=>e?!0:"Required!"}];try{let{address:e}=yield D(r);ho(e)}catch(e){console.log(e==null?void 0:e.message)}}),Oo=r=>d(void 0,null,function*(){let e={issueCollectionToken:"issue-collection-token",setLocalRoles:"set-roles",mint:"mint",giveaway:"giveaway",claimScFunds:"claim-sc-funds",setDrop:"set-drop",unsetDrop:"unset-drop",pauseMinting:"pause-minting",startMinting:"start-minting",setNewPrice:"set-new-price",claimDevRewards:"claim-dev-rewards",shuffle:"shuffle",populateAllowlist:"populate-allowlist",clearAllowlist:"clear-allowlist",removeAllowlistAddress:"remove-allowlist-address",enableAllowlist:"enable-allowlist",disableAllowlist:"disable-allowlist",changeBaseCids:"change-base-cids",setNewTokensLimitPerAddress:"set-new-tokens-limit-per-address",getTotalTokensLeft:"get-total-tokens-left",getProvenanceHash:"get-provenance-hash",getDropTokensLeft:"get-drop-tokens-left",getNftPrice:"get-nft-price",getNftTokenId:"get-nft-token-id",getNftTokenName:"get-nft-token-name",getCollectionTokenName:"get-collection-token-name",getTokensLimitPerAddressTotal:"get-tokens-limit-per-address-total",getMintedPerAddressTotal:"get-minted-per-address-total",getMintedPerAddressPerDrop:"get-minted-per-address-per-drop",getTokensLimitPerAddressPerDrop:"get-tokens-limit-per-address-per-drop",getAllowlistSize:"get-allowlist-size",isAllowlistEnabled:"is-allowlist-enabled",getAllowlistAddressCheck:"get-allowlist-address-check",isDropActive:"is-drop-active",isMintingPaused:"is-minting-paused",getTotalSupply:"get-total-supply",getTotalSupplyOfCurrentDrop:"get-total-supply-of-current-drop"};switch((r==="-h"||r==="--help")&&(console.log(`======================== | ||
Available commands: | ||
======================== | ||
${Object.values(e).join(` | ||
`)}`),te(9)),(!n||!Object.values(e).includes(n))&&(console.log(`==================================================== | ||
`)}`),ne(9)),(!r||!Object.values(e).includes(r))&&(console.log(`==================================================== | ||
Plaese provide a proper command. Available commands: | ||
==================================================== | ||
${Object.values(e).join(` | ||
`)}`),te(9)),n){case e.issueCollectionToken:Aa();break;case e.setLocalRoles:xa();break;case e.mint:Sa();break;case e.giveaway:va();break;case e.setDrop:ka();break;case e.unsetDrop:Pa();break;case e.pauseMinting:Ma();break;case e.startMinting:La();break;case e.setNewPrice:Fa();break;case e.claimDevRewards:Da();break;case e.shuffle:Oa();break;case e.populateAllowlist:Ga();break;case e.clearAllowlist:Ua();break;case e.removeAllowlistAddress:Qa();break;case e.enableAllowlist:Ra();break;case e.disableAllowlist:Ia();break;case e.changeBaseCids:Ea();break;case e.setNewTokensLimitPerAddress:Ca();break;case e.claimScFunds:Ba();break;case e.getTotalTokensLeft:x({functionName:Tr,resultLabel:"Total tokens left:",resultType:"number"});break;case e.getProvenanceHash:x({functionName:Nr,resultLabel:"Provenance hash of the collection:",resultType:"string"});break;case e.getDropTokensLeft:x({functionName:Ar,resultLabel:"Tokens left for the current drop:",resultType:"number"});break;case e.getNftPrice:x({functionName:xr,resultLabel:"Current NFT price is:",resultType:"number"});break;case e.getNftTokenId:x({functionName:Sr,resultLabel:"NFT token id:",resultType:"string"});break;case e.getNftTokenName:x({functionName:vr,resultLabel:"NFT token name:",resultType:"string"});break;case e.getCollectionTokenName:x({functionName:kr,resultLabel:"Collection token name:",resultType:"string"});break;case e.getTokensLimitPerAddressTotal:x({functionName:Pr,resultLabel:"Tokens limit per address:",resultType:"number"});break;case e.getMintedPerAddressPerDrop:$a();break;case e.getTokensLimitPerAddressPerDrop:x({functionName:Ir,resultLabel:"Tokens limit per address per current drop:",resultType:"number"});break;case e.getMintedPerAddressTotal:ja();break;case e.getAllowlistSize:x({functionName:be,resultLabel:"Total size of the Allowlist:",resultType:"number"});break;case e.isAllowlistEnabled:x({functionName:qr,resultLabel:"Result:",resultModifier:t=>t==="true"?"The allowlist is enabled!":"The allowlist is disabled!",resultType:"boolean"});break;case e.getAllowlistAddressCheck:qa();break;case e.isDropActive:x({functionName:Vr,resultLabel:"Result:",resultModifier:t=>t==="true"?"The drop is active!":"The drop is not active!",resultType:"boolean"});break;case e.isMintingPaused:x({functionName:Hr,resultLabel:"Result:",resultModifier:t=>t==="true"?"The minting is paused!":"The minting is not paused!",resultType:"boolean"});break;case e.getTotalSupply:x({functionName:zr,resultLabel:"Total supply of the collection:",resultType:"number"});break;case e.getTotalSupplyOfCurrentDrop:x({functionName:Wr,resultLabel:"Total supply of current drop:",resultType:"number"});break}});import Ya from"prompts";import Ka from"download";import ko from"cross-spawn";import{exit as Ja}from"process";var Va=/^[^\s^\x00-\x1f\\?*:"";<>|/.][^\x00-\x1f\\?*:"";<>|/]*[^\s^\x00-\x1f\\?*:"";<>|/.]+$/g,Po=()=>d(void 0,null,function*(){let n=[{type:"text",name:"dappDirectoryName",message:Ss,validate:e=>e?new RegExp(Va).test(e)?!0:"Wrong format for the directory name!":"Required!"}];try{let{dappDirectoryName:e}=yield Ya(n);e||(console.log("You have to provide the directory name!"),Ja(9)),Ka(Ne,`${process.cwd()}/${e}`,{extract:!0,strip:1}).then(()=>{process.chdir(e),ko.sync("npm",["install"],{stdio:"inherit"}),ko.sync("cp",[".env.example",".env.local"],{stdio:"inherit"}),process.chdir(".."),console.log(` | ||
`)}`),ne(9)),r){case e.issueCollectionToken:ka();break;case e.setLocalRoles:Pa();break;case e.mint:Ma();break;case e.giveaway:La();break;case e.setDrop:Fa();break;case e.unsetDrop:Da();break;case e.pauseMinting:Oa();break;case e.startMinting:Ea();break;case e.setNewPrice:Ca();break;case e.claimDevRewards:Ra();break;case e.shuffle:Ia();break;case e.populateAllowlist:Ya();break;case e.clearAllowlist:Ka();break;case e.removeAllowlistAddress:Ja();break;case e.enableAllowlist:Ga();break;case e.disableAllowlist:Ba();break;case e.changeBaseCids:ja();break;case e.setNewTokensLimitPerAddress:$a();break;case e.claimScFunds:qa();break;case e.getTotalTokensLeft:v({functionName:xr,resultLabel:"Total tokens left:",resultType:"number"});break;case e.getProvenanceHash:v({functionName:Sr,resultLabel:"Provenance hash of the collection:",resultType:"string"});break;case e.getDropTokensLeft:v({functionName:vr,resultLabel:"Tokens left for the current drop:",resultType:"number"});break;case e.getNftPrice:v({functionName:kr,resultLabel:"Current NFT price is:",resultType:"number"});break;case e.getNftTokenId:v({functionName:Pr,resultLabel:"NFT token id:",resultType:"string"});break;case e.getNftTokenName:v({functionName:Mr,resultLabel:"NFT token name:",resultType:"string"});break;case e.getCollectionTokenName:v({functionName:Lr,resultLabel:"Collection token name:",resultType:"string"});break;case e.getTokensLimitPerAddressTotal:v({functionName:Fr,resultLabel:"Tokens limit per address:",resultType:"number"});break;case e.getMintedPerAddressPerDrop:Qa();break;case e.getTokensLimitPerAddressPerDrop:v({functionName:Gr,resultLabel:"Tokens limit per address per current drop:",resultType:"number"});break;case e.getMintedPerAddressTotal:Ua();break;case e.getAllowlistSize:v({functionName:Te,resultLabel:"Total size of the Allowlist:",resultType:"number"});break;case e.isAllowlistEnabled:v({functionName:Jr,resultLabel:"Result:",resultModifier:t=>t==="true"?"The allowlist is enabled!":"The allowlist is disabled!",resultType:"boolean"});break;case e.getAllowlistAddressCheck:Va();break;case e.isDropActive:v({functionName:Wr,resultLabel:"Result:",resultModifier:t=>t==="true"?"The drop is active!":"The drop is not active!",resultType:"boolean"});break;case e.isMintingPaused:v({functionName:_r,resultLabel:"Result:",resultModifier:t=>t==="true"?"The minting is paused!":"The minting is not paused!",resultType:"boolean"});break;case e.getTotalSupply:v({functionName:Zr,resultLabel:"Total supply of the collection:",resultType:"number"});break;case e.getTotalSupplyOfCurrentDrop:v({functionName:Xr,resultLabel:"Total supply of current drop:",resultType:"number"});break}});import Ha from"prompts";import za from"download";import Eo from"cross-spawn";import{exit as Wa}from"process";var _a=/^[^\s^\x00-\x1f\\?*:"";<>|/.][^\x00-\x1f\\?*:"";<>|/]*[^\s^\x00-\x1f\\?*:"";<>|/.]+$/g,Co=()=>d(void 0,null,function*(){let r=[{type:"text",name:"dappDirectoryName",message:Ps,validate:e=>e?new RegExp(_a).test(e)?!0:"Wrong format for the directory name!":"Required!"}];try{let{dappDirectoryName:e}=yield Ha(r);e||(console.log("You have to provide the directory name!"),Wa(9)),za(Ae,`${process.cwd()}/${e}`,{extract:!0,strip:1}).then(()=>{process.chdir(e),Eo.sync("npm",["install"],{stdio:"inherit"}),Eo.sync("cp",[".env.example",".env.local"],{stdio:"inherit"}),process.chdir(".."),console.log(` | ||
`),console.log(`The Minter Dapp is initialized in the ${e} directory. Npm dependencies installed. .env.example copied into .env.local - change the settings there. Check the docs on how to run the Dapp: https://www.elven.tools`),console.log(` | ||
`)}).catch(t=>{t&&console.log(`Can't download the ${Ne} (${t.statusCode}:${t.statusMessage})`)})}catch(e){console.log(e==null?void 0:e.message)}});import Mo from"axios";import{writeFile as Ha}from"fs";import{exit as K}from"process";import za from"prompts";import Wa from"ora";import _a from"p-throttle";var fe=Wa("Processing, please wait..."),Za=_a({limit:Zr,interval:1e3}),Xa=n=>n.every(e=>Boolean(e)&&e.length===62);var ei=[{type:"select",name:"tokenType",message:`What do you want to distribute? Choose the token type. | ||
`,choices:[{title:"EGLD",value:"EGLD"},{title:"ESDT",value:"ESDT"},{title:"SFT",value:"SFT"},{title:"Meta ESDT",value:"Meta ESDT"}]},{type:n=>n!=="EGLD"?"text":null,name:"token",message:(n,e)=>`Please provide the ${e.tokenType} token ticker/id (ex. ABCD-ds323d${e.tokenType==="Meta ESDT"||e.tokenType==="SFT"?"-0d":""}) | ||
`,validate:n=>n?!0:"Required!"},{type:"text",name:"amount",message:(n,e)=>`Please provide the amount of the ${e.tokenType} to send per one address (ex. 1 is 1 ${e.tokenType}) | ||
`,validate:n=>n&&!Number.isNaN(n)&&Number(n)>0?!0:"Please provide a number, should be a proper EGLD amount, bigger than 0"}],Lo=()=>d(void 0,null,function*(){var n,e,t,s;try{let{amount:o,tokenType:a,token:i}=yield za(ei);o||(console.log("You have to provide the amount per address!"),K(9)),a!=="EGLD"&&!i&&(console.log("You have to provide the token ticker/id!"),K(9)),yield k();let{signer:c,userAccount:l,provider:g}=yield W(),m=I("nft-collection-owners.json",{noExitOnError:!0});if(m){let f=m.map(p=>p.owner);Xa(f)||(console.log("One or more addresses are not valid! Check if they are valid Elrond bech32 addresses."),K(9));let S=[];fe.text=`Distributing ${a} ${i?i+" ":""}to ${m.length} addresses, please wait...`,fe.start();let h,v,P;if(a==="ESDT"){let p=yield Mo.get(`${j[u]}/tokens/${encodeURIComponent(i.trim())}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}});h=(n=p==null?void 0:p.data)==null?void 0:n.decimals,h||(console.log("Can't get the information about the number of decimals for the token. Try again."),K(9))}if(a==="Meta ESDT"||a==="SFT"){let p=yield Mo.get(`${j[u]}/nfts/${encodeURIComponent(i.trim())}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}});h=(e=p==null?void 0:p.data)==null?void 0:e.decimals,v=(t=p==null?void 0:p.data)==null?void 0:t.nonce,P=(s=p==null?void 0:p.data)==null?void 0:s.ticker,a==="Meta ESDT"&&!h&&(console.log("Can't get the information about the decimals for the token. Try again."),K(9)),(!v||!P)&&(console.log("Can't get the token information (decimals, nonce, collection ticker). Try again."),K(9))}let E=Za(p=>{if(!!p){if(a==="EGLD"){let M=ho(o,p,l,c,g);S.push(M)}if(a==="ESDT"&&h){let M=yo(o,p,l,c,g,i,h);S.push(M)}if(a==="Meta ESDT"&&h&&P&&v){let M=bo(o,p,l,c,g,h,P,v);S.push(M)}if(a==="SFT"&&P&&v){let M=To(o,p,l,c,g,P,v);S.push(M)}}});for(let p of f)yield E(p);let N=yield Promise.all(S);fe.stop(),console.log("Distribution complete! Check the 'distribiution-log.json' file for more details."),Ha("distribiution-log.json",JSON.stringify(N,null,2),p=>{if(p)throw p})}else console.log("There were problems when reading the nft-collection-owners.json file."),console.log("Make sure you've generated the file using the 'elven-tools collection-nft-owners' command. Or you created the file with the structure: [{ 'owner': 'erd1...' }, { 'owner': 'erd1...' }]"),K(9)}catch(o){console.log(` | ||
${JSON.stringify(o==null?void 0:o.message)}`),console.log("Check if you use the correct chain (mainnet, devnet, testnet) and if the chosen token is on your wallet. Sometimes it can also be a temporary network outage.")}finally{fe.stop()}});var B={deploy:"deploy",derivePem:"derive-pem",nftMinter:"nft-minter",collectionNftOwners:"collection-nft-owners",distributeToOwners:"distribute-to-owners",initDapp:"init-dapp"},_=ti,J=_?_[2]:void 0;(J==="--version"||J==="-v")&&(console.log(Z.version),Oe());var ni=Object.values(B),Fo=[...ni,"--version","-v","--help","-h"],ri=`======================== | ||
`)}).catch(t=>{t&&console.log(`Can't download the ${Ae} (${t.statusCode}:${t.statusMessage})`)})}catch(e){console.log(e==null?void 0:e.message)}});import Ro from"axios";import{writeFile as Za}from"fs";import{exit as Y}from"process";import Xa from"prompts";import ei from"ora";import ti from"p-throttle";var we=ei("Processing, please wait..."),ni=ti({limit:ts,interval:1e3}),ri=r=>r.every(e=>Boolean(e)&&e.length===62);var si=[{type:"select",name:"tokenType",message:`What do you want to distribute? Choose the token type. | ||
`,choices:[{title:"EGLD",value:"EGLD"},{title:"ESDT",value:"ESDT"},{title:"SFT",value:"SFT"},{title:"Meta ESDT",value:"Meta ESDT"}]},{type:r=>r!=="EGLD"?"text":null,name:"token",message:(r,e)=>`Please provide the ${e.tokenType} token ticker/id (ex. ABCD-ds323d${e.tokenType==="Meta ESDT"||e.tokenType==="SFT"?"-0d":""}) | ||
`,validate:r=>r?!0:"Required!"},{type:"text",name:"amount",message:(r,e)=>`Please provide the amount of the ${e.tokenType} to send per one address (ex. 1 is 1 ${e.tokenType}) | ||
`,validate:r=>r&&!Number.isNaN(r)&&Number(r)>0?!0:"Please provide a number, should be a proper EGLD amount, bigger than 0"}],Io=()=>d(void 0,null,function*(){var r,e,t,s;try{let{amount:o,tokenType:a,token:i}=yield Xa(si);o||(console.log("You have to provide the amount per address!"),Y(9)),a!=="EGLD"&&!i&&(console.log("You have to provide the token ticker/id!"),Y(9)),yield S();let{signer:c,userAccount:l,provider:p}=yield z(),u=E("nft-collection-owners.json",{noExitOnError:!0});if(u){let f=u.map(m=>m.owner);ri(f)||(console.log("One or more addresses are not valid! Check if they are valid Elrond bech32 addresses."),Y(9));let b=[];we.text=`Distributing ${a} ${i?i+" ":""}to ${u.length} addresses, please wait...`,we.start();let h,k,P;if(a==="ESDT"){let m=yield Ro.get(`${j[g]}/tokens/${encodeURIComponent(i.trim())}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}});h=(r=m==null?void 0:m.data)==null?void 0:r.decimals,h||(console.log("Can't get the information about the number of decimals for the token. Try again."),Y(9))}if(a==="Meta ESDT"||a==="SFT"){let m=yield Ro.get(`${j[g]}/nfts/${encodeURIComponent(i.trim())}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}});h=(e=m==null?void 0:m.data)==null?void 0:e.decimals,k=(t=m==null?void 0:m.data)==null?void 0:t.nonce,P=(s=m==null?void 0:m.data)==null?void 0:s.ticker,a==="Meta ESDT"&&!h&&(console.log("Can't get the information about the decimals for the token. Try again."),Y(9)),(!k||!P)&&(console.log("Can't get the token information (decimals, nonce, collection ticker). Try again."),Y(9))}let C=ni(m=>{if(!!m){if(a==="EGLD"){let M=So(o,m,l,c,p);b.push(M)}if(a==="ESDT"&&h){let M=vo(o,m,l,c,p,i,h);b.push(M)}if(a==="Meta ESDT"&&h&&P&&k){let M=ko(o,m,l,c,p,h,P,k);b.push(M)}if(a==="SFT"&&P&&k){let M=Po(o,m,l,c,p,P,k);b.push(M)}}});for(let m of f)yield C(m);let A=yield Promise.all(b);we.stop(),console.log("Distribution complete! Check the 'distribiution-log.json' file for more details."),Za("distribiution-log.json",JSON.stringify(A,null,2),m=>{if(m)throw m})}else console.log("There were problems when reading the nft-collection-owners.json file."),console.log("Make sure you've generated the file using the 'elven-tools collection-nft-owners' command. Or you created the file with the structure: [{ 'owner': 'erd1...' }, { 'owner': 'erd1...' }]"),Y(9)}catch(o){console.log(` | ||
${JSON.stringify(o==null?void 0:o.message)}`),console.log("Check if you use the correct chain (mainnet, devnet, testnet) and if the chosen token is on your wallet. Sometimes it can also be a temporary network outage.")}finally{we.stop()}});var G={deploy:"deploy",derivePem:"derive-pem",nftMinter:"nft-minter",collectionNftOwners:"collection-nft-owners",distributeToOwners:"distribute-to-owners",initDapp:"init-dapp"},W=oi,K=W?W[2]:void 0;(K==="--version"||K==="-v")&&(console.log(_.version),Ee());var ai=Object.values(G),jo=[...ai,"--version","-v","--help","-h"],ii=`======================== | ||
Available commands: | ||
======================== | ||
${Fo.join(` | ||
`)}`;(J==="--help"||J==="-h")&&(console.log(ri),Oe(9));(!J||!Object.values(B).includes(J))&&(console.log(`==================================================== | ||
${jo.join(` | ||
`)}`;(K==="--help"||K==="-h")&&(console.log(ii),Ee(9));(!K||!Object.values(G).includes(K))&&(console.log(`==================================================== | ||
Plaese provide a proper command. Available commands: | ||
==================================================== | ||
${Fo.join(` | ||
`)}`),Oe(9));switch(J){case B.derivePem:So();break;case B.deploy:No(_?_[3]:void 0);break;case B.nftMinter:vo(_?_[3]:void 0);break;case B.collectionNftOwners:xo();break;case B.initDapp:Po();break;case B.distributeToOwners:Lo();break;default:break} | ||
${jo.join(` | ||
`)}`),Ee(9));switch(K){case G.derivePem:Do();break;case G.deploy:Mo(W?W[3]:void 0);break;case G.nftMinter:Oo(W?W[3]:void 0);break;case G.collectionNftOwners:Fo();break;case G.initDapp:Co();break;case G.distributeToOwners:Io();break;default:break} |
@@ -0,1 +1,5 @@ | ||
### [1.15.0](https://github.com/ElvenTools/elven-tools-cli/releases/tag/v1.15.0) (2022-08-27) | ||
- giveaway functionality changes - now you can use multiple addresses for the giveaway. You can use the giveaway.json input file or enter them by hand. | ||
- gas limits adjustments | ||
### [1.14.3](https://github.com/ElvenTools/elven-tools-cli/releases/tag/v1.14.2) (2022-08-13) | ||
@@ -2,0 +6,0 @@ - bump dapp version |
@@ -8,5 +8,5 @@ { | ||
"types": "build/types", | ||
"version": "1.14.3", | ||
"version": "1.15.0", | ||
"elvenTools": { | ||
"smartContractVersionTagName": "v1.8.0", | ||
"smartContractVersionTagName": "v1.9.0", | ||
"minterDappVersionTagName": "v3.1.1" | ||
@@ -13,0 +13,0 @@ }, |
@@ -12,3 +12,3 @@ ### Elven Tools CLI | ||
- deploy the NFT minter Smart Contract on the Elrond blockchain | ||
- interact with the NFT minter Smart Contract on the Elrond blockchain | ||
- setup and interact with the NFT minter Smart Contract on the Elrond blockchain | ||
- provides a couple of helper tools for getting the data from API | ||
@@ -54,9 +54,9 @@ - get collection owners | ||
### Contact | ||
### Most common recipes | ||
- [Telegram](https://t.me/juliancwirko) | ||
- [Twitter](https://twitter.com/JulianCwirko) | ||
Here are ready-to-use recipes and more information on real-life use cases: [Elven Tools Recipes](https://www.elven.tools/docs/recipes.html) | ||
### You may also like | ||
- [elven.js](https://github.com/juliancwirko/elven.js) - simplified wrapper over erdjs, designed to work as a plug-n-play solution for browser based use cases. No build steps and frameworks, just one file to rule it all! Check usage examples! | ||
- [NFT Art Maker](https://github.com/juliancwirko/nft-art-maker) - generates images and metadata files and packs them into CAR files, all from provided PNG layers. | ||
@@ -70,4 +70,9 @@ - [Buildo Begins](https://github.com/ElrondDevGuild/buildo-begins) - CLI toolset for interacting with the Elrond blockchain, APIs and smart contracts | ||
### Contact | ||
- [Telegram](https://t.me/juliancwirko) | ||
- [Twitter](https://twitter.com/JulianCwirko) | ||
### License | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70095
239
76
1