const rpcUrl = '<Your RPC URL that supports websocket>';
const web3 = new Web3(rpcUrl);
const contract = new web3.eth.Contract(ABI, gachaponAddress);
// Listen to the next RoundCompleted event with this requestId
contract.once('RoundCompleted', {
filter: {_requestId: requestId},
}, (error: Error, event: EventData) => {
// Extract the prizes indexes from the event
const nftIndexes: number[] = (event.returnValues._prizes as string[]).map((prize) => +prize);
const timesPlayed: number = +event.returnValues._times;
// By default, a round contains an array of 10 zeros, so you need to
// take only the prizes which have an index lower than the `_times` value
const prizes = nftIndexes.splice(0, timesPlayed);
// This array will contain the index at which the prizes are in the gachapon,
// you can call `getNft()` on the contract to get the details of a particular NFT