Skip to content

Instantly share code, notes, and snippets.

View atisheksingh's full-sized avatar
🏢
Working from office

atisheks1 atisheksingh

🏢
Working from office
  • Blockchain Architech @ OriginalsGateways
  • Pune , India
  • 03:51 (UTC +05:30)
View GitHub Profile
// To enable meta transaction, let create a generic method that calls executeMetaTransaction by taking the user signature
// and then execute transaction via Biconomy
// Dependencies
import {toBuffer} from "ethereumjs-util";
import abi from "ethereumjs-abi";
import events from "events";
// Initialization of web3
let web3 = new Web3(window.ethereum);
@atisheksingh
atisheksingh / docs.chain.link...samples...VRF...Lottery.sol
Created December 21, 2022 13:26 — forked from jackpmorgan/docs.chain.link...samples...VRF...Lottery.sol
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.12+commit.f00d7308.js&optimize=false&runs=200&gist=
import { useEffect, useState } from "react";
import { AppConfig, UserSession, showConnect, openContractCall } from "@stacks/connect";
import { StacksMocknet, StacksTestnet } from "@stacks/network";
import { uintCV, stringUtf8CV , AnchorMode, makeStandardSTXPostCondition , FungibleConditionCode} from '@stacks/transactions';
// import { makeContractCall, standardPrincipalCV ,bufferCV, StacksMainnet, StringAsciiCV, broadcastTransaction, stringUtf8CV, trueCV, uintCV, FungibleConditionCode, makeStandardSTXPostCondition, bufferCVFromString } from '@blockstack/stacks-transactions';
import { standardPrincipalCV } from '@stacks/transactions';
function App() {
const [message, setMessage] = useState("");
@atisheksingh
atisheksingh / untitled3.ipynb
Created November 22, 2024 09:40
Untitled3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@atisheksingh
atisheksingh / L2OutputOracle.sol
Created December 3, 2024 15:08 — forked from markodayan/L2OutputOracle.sol
L2 Output Oracle (replaces the State Commitment Chain. Will be used to receive fault proof data)
//SPDX-License-Identifier: MIT
// https://community.optimism.io/docs/developers/bedrock/differences/#l1-contracts
pragma solidity 0.8.10;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title L2OutputOracle
* @notice The L2 state is committed to in this contract
* The payable keyword is used on appendL2Output to save gas on the msg.value check.