This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require("axios"); | |
const BASE_URL = "https://testnet.mirrornode.hedera.com/api/v1"; // Use mainnet for production | |
async function getTransactionReceipt(transactionHashOrId) { | |
try { | |
const transactionUrl = `${BASE_URL}/transactions/${transactionHashOrId}`; | |
const response = await axios.get(transactionUrl); | |
if (response.status !== 200) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client, TransactionId, TransactionReceiptQuery } = require("@hashgraph/sdk"); | |
const axios = require("axios"); | |
// Initialize Hedera client (you may need to configure this based on your setup) | |
const client = Client.forTestnet(); // or Client.forMainnet() for production | |
async function getTransactionReceipt(transactionHash) { | |
try { | |
let txId = await getTransactionIdFromHash(transactionHash); | |
// Parse transaction id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Client, TransactionId, TransactionReceiptQuery } from "@hashgraph/sdk"; | |
import axios from "axios"; | |
import { useCallback, useState } from "react"; | |
// Initialize Hedera client (you may need to configure this based on your setup) | |
const client = Client.forTestnet(); // or Client.forMainnet() for production | |
export interface TransactionReceiptResponse { | |
taskId: { | |
taskState: "ExecSuccess" | "ExecReverted" | "WaitingForConfirmation"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
import { gql, request } from 'graphql-request'; | |
import { BASE_URL } from '@/utils/config'; | |
// Keeping the interfaces unchanged as they are not dependent on the HTTP client used | |
const SHOPIFY_API_VERSION = '2024-04'; | |
export interface GenericShopifyAPIPayload { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rOptimal = BigNumber.from(Math.floor(Number(rewardData?.rOptimal))); | |
const maximumRLimit = await getPercentileData(rOptimal, general_settings.maximumRLimit); | |
const notifyRewardAmount = await getPercentileData( | |
BigNumber.from(Math.ceil(Number(rewardData?.totalSupply))), | |
general_settings.notifyRewardAmount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ethers } from "ethers"; | |
import { createWeb3 } from "../lib/web3"; | |
import { delay } from "../helpers/delay"; | |
import { VaultPermitParams, brandService, relay, signConsent } from "@developeruche/protocol-core"; | |
import { AddLiquidityForOpenRewardsWithTreasuryAndMeDispenserAndStartPoolProps } from "../lib/types"; | |
import axios from "axios"; | |
export async function addLiquidityForOpenRewardsWithTreasuryAndMeDispenserAndStartPoolFN({ | |
email, | |
magic, | |
rewardAmount, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SAME BRAND | |
let isConnected = magicWeb3; | |
while (!isConnected) { | |
await delay(1000); // Wait for 1 second | |
isConnected = magicWeb3; | |
} | |
const { email: connectedEmail } = await magic.user.getInfo(); | |
//IF THE PERSISTED USER INFO IS NOT THE INFO OF THE USER TRYING TO PERFORM THE FUNCTION logout and try to login again | |
if (email !== connectedEmail) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "6c2faa07-3c01-4b19-8c6c-798fb79c1b02", | |
"createdAt": "2023-12-22T15:22:30.151Z", | |
"updatedAt": "2024-03-22T14:39:02.057Z", | |
"brandId": "3e4c43a1-2abb-4a2c-b825-77ef2a232ab7", | |
"description": "Desiderio N.1 reward", | |
"slug": "bubble-revolution-1711030268707", | |
"rewardImage": "https://res.cloudinary.com/dlwsf8xgj/image/upload/v1703771559/tzejsfitgcgawszioqp8.jpg", | |
"otherRewardType": null, | |
"rewardSymbol": "BUB", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "8e6cdaae-1b26-4be1-ad8e-db93493016cf", | |
"createdAt": "2023-12-06T08:12:28.662Z", | |
"updatedAt": "2023-12-06T08:12:28.662Z", | |
"name": "Children Category", | |
"description": "orem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt labore et dolore magna aliqua. Consequat nisl vel pretium lectus quam id. Semper quis lectus nulla at volutpat diam ut venenatis. Do", | |
"image": "https://res.cloudinary.com/digital-specie/image/upload/v1693854605/yolncm799wsd4eaqrk44.png", | |
"banner": "https://res.cloudinary.com/digital-specie/image/upload/v1693854839/kxbxk1zrpblyvmhulup9.jpg", | |
"slug": "children-category-1701850348660", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Sports & Outdoors", | |
"description": "orem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\n incididunt labore et dolore magna aliqua. Consequat nisl vel pretium lectus quam id.\n Semper quis lectus nulla at volutpat diam ut venenatis. Do", | |
"image": "", | |
"banner": "", | |
"type": "sub-category", | |
"parentId": "9ade2a58-0ee2-6fea-a58d-e3fe72f9ced1" | |
} | |
https://api.memarketplace.io/category |
NewerOlder