Skip to content

Instantly share code, notes, and snippets.

View mrice32's full-sized avatar

Matt Rice mrice32

View GitHub Profile
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.16;
import "https://github.com/UMAprotocol/protocol/blob/7a93650a7494eaee83756382a18ecf11314499cf/packages/core/contracts/optimistic-oracle-v3/interfaces/OptimisticOracleV3Interface.sol";
// ***************************************
// * Minimum Viable OOV3 Integration *
// ***************************************
@mrice32
mrice32 / gist:c818695758fcd2749eeca93e7e02a5af
Created May 26, 2022 05:54
Across v2 proposal and dispute
Proposal:
2022-05-26 04:39:53 [info]: {
"at": "MultiCallerClient",
"message": "Multicall batch sent! 🧙‍♂️",
"mrkdwn": "*Transactions sent in batch on Mainnet:*\n 1. Proposed new root bundle 🌱: \n\t*Bundle blocks*:\n\t\t1: [14844158,14845998]\n\t\t10: [8998620,9012872]\n\t\t137: [28767180,28779227]\n\t\t288: [624651,625038]\n\t\t42161: [12952498,12966771]\n\t*PoolRebalance*:\n\t\troot:0x3d4ed72b...\n\t\tleaves:\n\t\t\t0: {\"chainId\":1,\"bundleLpFees\":[\"0.003128\",\"49.21\",\"3.84\",\"0.005653\"],\"netSendAmounts\":[\"3.32\",\"63,047.67\",\"2,045.59\",\"4.45\"],\"runningBalances\":[\"0.000\",\"0.000\",\"0.000\",\"0.000\"],\"l1Tokens\":[\"WBTC\",\"DAI\",\"USDC\",\"WETH\"],\"groupId\":0}\n\t\t\t1: {\"chainId\":10,\"bundleLpFees\":[\"0.000\",\"0.000\",\"0.000\",\"0.000\"],\"netSendAmounts\":[\"-3.00\",\"-1,167.27\",\"-799.57\",\"-0.9103\"],\"runningBalances\":[\"0.000\",\"0.000\",\"0.000\",\"0.000\"],\"l1Tokens\":[\"WBTC\",\"DAI\",\"USDC\",\"WETH\"],\"groupId\":0}\n\t\t\t2: {\"chainId\":137,\"bundleLpFe
// db is the contract at address: https://arbiscan.io/address/0xd8c6dd978a3768f7ddfe3a9aad2c3fd75fa9b6fd#code
> await db.getPastEvents("FundsDeposited", { fromBlock: "3643470", toBlock: "3645471" })
Uncaught:
Error: Returned error: Log response size exceeded. You can make eth_getLogs requests with up to a 2K block range and no limit on the response size, or you can request any block range with a cap of 10K logs in the response.
at Object.ErrorResponse (/Users/matt/git/protocol/node_modules/web3-core-requestmanager/node_modules/web3-core-helpers/lib/errors.js:28:19) {
data: {
stack: 'ProviderError: Log response size exceeded. You can make eth_getLogs requests with up to a 2K block range and no limit on the response size, or you can request any block range with a cap of 10K logs in the response.\n' +
' at HttpProvider.request (/Users/matt/git/protocol/node_modules/hardhat/src/internal/core/providers/http.ts:49:19)\n' +
' at HDWalletProvider.request (/Users/matt/git/protocol/node_mod

Keybase proof

I hereby claim:

  • I am mrice32 on github.
  • I am mrice32 (https://keybase.io/mrice32) on keybase.
  • I have a public key ASDJPcjLhG9NiHfqAM_tn0q9r8QJEvOsblbA9T_cqT65OQo

To claim this, I am signing this object:

[
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "expirationTimestamp",
"type": "uint256"
},
@mrice32
mrice32 / flatten.sh
Created April 24, 2020 19:11
Flatten script
#!/usr/bin/env bash
# Must run from protocol/
# Usage: ./flatten.sh ~/SOME_TARGET_DIRECTORY
TARGET_DIR=$1
mkdir -p $TARGET_DIR
find ./core/contracts/ -name '*.sol' -type f -exec cp {} $TARGET_DIR \;
find ./node_modules/\@openzeppelin/contracts/ -name '*.sol' -type f -exec cp {} $TARGET_DIR \;