Skip to content

Instantly share code, notes, and snippets.

View AmanRaj1608's full-sized avatar
🍀
Get Schwifty!

Aman Raj AmanRaj1608

🍀
Get Schwifty!
View GitHub Profile

Multi-Chain Indexing Architecture

Let's say we want to indexing multiple networks (EVM and Solana) using a unified query layer with Spice.ai

flowchart TD
    subgraph Blockchain Networks
        E[EVM Chains] 
        S[Solana]
 end
#[derive(Debug)]
struct Point3d {
x: i32,
y: i32,
z: i32,
}
#[derive(Debug)]
struct Point2d {
x: i32,
y: i32,
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol";
contract Faucet {
address public owner;
// USDC token contract interface
IERC20 public usdc;
// USDT token contract interface
@AmanRaj1608
AmanRaj1608 / permission_mpc.rs
Created May 2, 2024 16:00
Decode the transaction as per the order given by the user
use alloy_sol_types::{sol, SolCall, SolInterface};
use hex_literal::hex;
sol! {
#[derive(Debug, PartialEq)]
interface ISmartAccount {
function execute_ncC(address dest, uint256 value, bytes calldata func) external;
function executeBatch_y6U(address[] dest, uint256[] value, bytes[] calldata func) external;
}
}
NYa2X7mKidSwSTPtEN3RJVm5GXpdoLf9HN
// File: @openzeppelin/contracts/utils/Counters.sol
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
import React, { useState, useEffect } from "react";
import "../App.css";
import Button from "@material-ui/core/Button";
import {
NotificationContainer,
NotificationManager
} from "react-notifications";
import "react-notifications/lib/notifications.css";
import Backdrop from '@material-ui/core/Backdrop';
import CircularProgress from '@material-ui/core/CircularProgress';
@AmanRaj1608
AmanRaj1608 / app.ts
Created September 18, 2022 22:06
biconomy sdk backend
import Web3 from "web3";
import HDWalletProvider from "@truffle/hdwallet-provider";
import { Biconomy } from "@biconomy/mexa";
const infura = "https://goerli.infura.io/v3/f0493a02561f4419be93dde46cc584c6";
const pkey = "";
const main = async () => {
console.log("start");
let provider = new HDWalletProvider(pkey, infura);
@AmanRaj1608
AmanRaj1608 / mpv_install.md
Created December 4, 2021 14:44 — forked from davidhq/mpv_install.md
mpv ◈ Media Player binary -- Install macOS / linux / windows