import { Currency , getETHPayment , getPlatformAddresses , getSignedPayment , ManualOracle , Payment } from '@imtbl/platform' ; import { Blockchain } from '@imtbl/test-utils' ; import { ethers , Wallet } from 'ethers' ; import 'jest' ; import { GU_S1_EPIC_PACK_SKU , GU_S1_LEGENDARY_PACK_SKU , GU_S1_RARE_PACK_SKU , GU_S1_SHINY_PACK_SKU } from '../../deployment/constants' ; import { getGodsUnchainedAddresses } from '../../src/addresses/index' ; import { Beacon , Cards , EpicPack , Escrow , LegendaryPack , PurchaseProcessor , Raffle , RarePack , S1Cap , S1Sale , ShinyPack } from '../../src/contracts' ; ethers . errors . setLogLevel ( 'error' ) ; jest . setTimeout ( 60000 ) ; const config = require ( 'dotenv' ) . config ( { path : '../../.env' } ) . parsed ; const provider = new ethers . providers . JsonRpcProvider ( config . RPC_ENDPOINT ) ; const blockchain = new Blockchain ( provider ) ; const wallet = new ethers . Wallet ( config . PRIVATE_KEY , provider ) ; describe ( '02_season_one' , ( ) => { const godUnchainedAddressBook = getGodsUnchainedAddresses ( config . DEPLOYMENT_NETWORK_ID , config . DEPLOYMENT_ENVIRONMENT ) ; const platformAddressBook = getPlatformAddresses ( config . DEPLOYMENT_NETWORK_ID , config . DEPLOYMENT_ENVIRONMENT ) ; let nonce = Math . random ( ) * 100000 ; let beacon ; let processor ; let escrow ; let cards ; let s1Raffle ; let s1Sale ; let cap ; let epicPack ; let rarePack ; let shinyPack ; let legendaryPack ; let oracle ; let epicCost ; let rareCost ; let legendaryCost ; let shinyCost ; let epicPayment ; let rarePayment ; let legendaryPayment ; let shinyPayment ; const defaultQuantity = 1 ; beforeAll ( async ( ) => { beacon = Beacon . at ( wallet , platformAddressBook . beaconAddress ) ; processor = PurchaseProcessor . at ( wallet , platformAddressBook . processorAddress ) ; escrow = Escrow . at ( wallet , platformAddressBook . escrowAddress ) ; cards = Cards . at ( wallet , godUnchainedAddressBook . cardsAddress ) ; s1Raffle = Raffle . at ( wallet , godUnchainedAddressBook . seasonOne . raffleAddress ) ; s1Sale = S1Sale . at ( wallet , godUnchainedAddressBook . seasonOne . saleAddress ) ; epicPack = EpicPack . at ( wallet , godUnchainedAddressBook . seasonOne . epicPackAddress ) ; rarePack = RarePack . at ( wallet , godUnchainedAddressBook . seasonOne . rarePackAddress ) ; shinyPack = ShinyPack . at ( wallet , godUnchainedAddressBook . seasonOne . shinyPackAddress ) ; oracle = ManualOracle . at ( wallet , platformAddressBook . manualOracleAddress ) ; legendaryPack = LegendaryPack . at ( wallet , godUnchainedAddressBook . seasonOne . legendaryPackAddress ) ; epicCost = ( await epicPack . price ( ) ) . toNumber ( ) ; rareCost = ( await rarePack . price ( ) ) . toNumber ( ) ; legendaryCost = ( await legendaryPack . price ( ) ) . toNumber ( ) ; shinyCost = ( await shinyPack . price ( ) ) . toNumber ( ) ; } ) ; describe ( '' , ( ) => { it ( '' , ( ) => { } ) ; } ) ; } ) ;