async function main() {
    const provider = new HDWalletProvider(MNEMONIC, `https://${NETWORK}.infura.io/v3/${INFURA_KEY}`)
    const web3Instance = new web3(
        provider
    )

    if (!FACTORY_CONTRACT_ADDRESS) {
        console.error("Please set an NFT contract address.")
        return
    }

    const factoryContract = new web3Instance.eth.Contract(FACTORY_ABI, FACTORY_CONTRACT_ADDRESS, { gasLimit: "1000000" })
    const result = await factoryContract.methods.open(0, OWNER_ADDRESS, 1).send({ from: OWNER_ADDRESS });
    console.log("Created. Transaction: " + result.transactionHash)
}
/**
 * For now, this script just opens a lootbox.
 */
For now, this script just opens a lootbox.
For now this script just opens a lootbox .
async function main() {
    const provider = new HDWalletProvider(MNEMONIC, `https://${NETWORK}.infura.io/v3/${INFURA_KEY}`)
    const web3Instance = new web3(
        provider
    )
    if (!FACTORY_CONTRACT_ADDRESS) {
        console.error("Please set an NFT contract address.")
        return
    }
    const factoryContract = new web3Instance.eth.Contract(FACTORY_ABI, FACTORY_CONTRACT_ADDRESS, { gasLimit: "1000000" })
    const result = await factoryContract.methods.open(0, OWNER_ADDRESS, 1).send({ from: OWNER_ADDRESS });
    console.log("Created. Transaction: " + result.transactionHash)
}
async function main ( ) { const provider = new HDWalletProvider ( MNEMONIC , ` ${ NETWORK } ${ INFURA_KEY } ` ) const web3Instance = new web3 ( provider ) if ( ! FACTORY_CONTRACT_ADDRESS ) { console . error ( "Please set an NFT contract address." ) return } const factoryContract = new web3Instance . eth . Contract ( FACTORY_ABI , FACTORY_CONTRACT_ADDRESS , { gasLimit : "1000000" } ) const result = await factoryContract . methods . open ( 0 , OWNER_ADDRESS , 1 ) . send ( { from : OWNER_ADDRESS } ) ; console . log ( "Created. Transaction: " + result . transactionHash ) }
For now, this script just opens a lootbox.
For now this script just opens a lootbox .