Skip to content

Instantly share code, notes, and snippets.

View Teepheh-Git's full-sized avatar
💭
Focus

Oguntoyinbo Boluwatife Teepheh-Git

💭
Focus
View GitHub Profile
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) {
@Teepheh-Git
Teepheh-Git / hash.ts
Last active August 26, 2025 10:59
ts
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
@Teepheh-Git
Teepheh-Git / .ts
Created August 21, 2025 00:03
check.ts
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";
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 {
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
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,
@Teepheh-Git
Teepheh-Git / redeem.ts
Last active September 26, 2024 08:29
SAME and Cross BRAND REDEM
//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) {
{
"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",
[
{
"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",
@Teepheh-Git
Teepheh-Git / .js
Last active February 13, 2024 15:27
upload category and sub-category
{
"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