Skip to content

Instantly share code, notes, and snippets.

View gaslimitreached's full-sized avatar
🐻‍❄️

Cache Monet gaslimitreached

🐻‍❄️
View GitHub Profile
import { Layer, Effect, Context, Schedule, Cause, Console } from "effect";
import * as S from "@effect/schema/Schema";
import { HttpClient } from "@effect/platform";
import { ParseError } from "@effect/schema/ParseResult";
const Transaction = S.Struct({
blockNumber: S.String,
timeStamp: S.Union(S.String, S.Undefined),
methodId: S.String,
functionName: S.String,
@gaslimitreached
gaslimitreached / open-next-cdk-stack.ts
Last active April 9, 2023 23:28
Deploy NextJS (open-next) to AWS using Cloud Developer Kit [WIP]
// open-next: https://open-next.js.org/
// example: https://github.com/serverless-stack/open-next/tree/main/example
// prior art:
// https://github.com/serverless-stack/sst/blob/master/packages/sst/src/constructs/NextjsSite.ts
// https://serverless-nextjs.com/docs/cdkconstruct/
// https://github.com/rayova/cdk-serverless-nextjs
import { CfnOutput, Duration, Fn, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
@gaslimitreached
gaslimitreached / event-listener-eth.go
Last active October 13, 2022 15:39
Event Listener Ethereum
package main
import (
"context"
"fmt"
"log"
"math/big"
"strconv"
"time"
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Context.sol";
@gaslimitreached
gaslimitreached / web3.html
Last active February 10, 2022 14:45
Simple web3 example (no worky)
<!DOCTYPE html>
<title>Ethereum Basic</title>
<p>Supply: <span id="supply">0</span></p>
<button id="example">Button</button>
<script type="module">