CryptoFly.us | CRYPTOCURRENCY BITCOIN SHIRTS CLOTHING APPAREL HATS

CRYPTO NEWS

Binance crypto exchange outage sparks outrage as traders lose millions

Binance’s policy allows investors to get compensation on trading losses due to system or internal issues but does not cover the “what could have been” situations.

"Reading in sequence loop" (deploy.js, hardhat, nodejs, javascript) to go through all svg files in directory, for create multi NFTs

greeting the next code is deploying code(java script code) that direct solidity contract code to one specific svg files (some types of image) in specific directory(folder) for mint this file. i try find away to edit this code. so instead of go for specific files it go for specific folder that continue multi numbers of::Listen

greeting the next code is deploying code(java script code) that direct solidity contract code to one specific svg files (some types of image) in specific directory(folder) for mint this file. i try find away to edit this code. so instead of go for specific files it go for specific folder that continue multi numbers of svg files. then:

1- the code test the file extension, if find it svg file so mint it, if not leave it. 2- wait till finish first mint. 3- go to next file, and so on until go through all files in directory.

thanks in advance

let { networkConfig } = require('../helper-hardhat-config') const fs = require('fs')  module.exports = async ({     getNamedAccounts,     deployments,     getChainId }) => {      const { deploy, log } = deployments     const { deployer } = await getNamedAccounts()     const chainId = await getChainId()      log("----------------------------------------------------")     const SVGNFT = await deploy('SVGNFT', {         from: deployer,         log: true     })     log(`You have deployed an NFT contract to ${SVGNFT.address}`)     const svgNFTContract = await ethers.getContractFactory("SVGNFT")     const accounts = await hre.ethers.getSigners()     const signer = accounts[0]     const svgNFT = new ethers.Contract(SVGNFT.address, svgNFTContract.interface, signer)     const networkName = networkConfig[chainId]['name']      log(`Verify with:n npx hardhat verify --network ${networkName} ${svgNFT.address}`)     log("Let's create an NFT now!")     let filepath = "./img/uhgkj.svg"     let svg = fs.readFileSync(filepath, { encoding: "utf8" })     log(`We will use ${filepath} as our SVG, and this will turn into a tokenURI. `)     tx = await svgNFT.create(svg)     await tx.wait(1)     log(`You've made your first NFT!`)     log(`You can view the tokenURI here ${await svgNFT.tokenURI(0)}`) }  module.exports.tags = ['all', 'svg'] 

Binance crypto exchange outage sparks outrage as traders lose millions

Shopping cart
There are no products in the cart!
Continue shopping
0