Skip to content

Instantly share code, notes, and snippets.

View sparrowDom's full-sized avatar

Domen Grabec sparrowDom

  • Origin Protocol
  • Slovenia
View GitHub Profile
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.4;
import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { UV3Math } from "./lib/UV3Math.sol";
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.4;
import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { UV3Math } from "./lib/UV3Math.sol";
# import matplotlib.animation
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
import numpy as np
import json
plt.rcParams["animation.html"] = "jshtml"
plt.rcParams['figure.dpi'] = 150
plt.ioff()
fig, ax = plt.subplots()
account, squid_balance, on_chain_balance
0x000000000000000000000000000000000000291c,7153607089582780257695,7153607089582780257695
0x000000000000000000000000000000000000dead,1139574564006588925,1139574564006588925
0x000000000000cb53d776774284822b1298ade47f,4,3
0x00000000006004dfb6ab427a47994f2a6a4f6334,1,2
0x00000000008c4fb1c916e0c88fd4cc402d935e7d,1477111840,2
0x00000000009726632680fb29d3f7a9734e3010e2,120664919412622969336,0
0x000000005736775feb0c8568e7dee77222a26880,1,1
0x0000000099cb7fc48a935bceb9f05bbae54e8987,1,3
0x00000000b7ca7e12dcc72290d1fe47b2ef14c607,1,2
let re = /\D*/g
input
.map(item => {
// replace map
digiMap =
[
['one', '1'],
['two', '2'],
['three', '3'],
['four', '4'],
let re = /\D*/g
input
.map(item => {
// replace map
digiMap =
[
['one', '1'],
['two', '2'],
['three', '3'],
['four', '4'],
let re = /\D*/g
input
.map(item => {
// replace map
digiMap =
[
['one', '1'],
['two', '2'],
['three', '3'],
['four', '4'],
sq5fivetwothree1
six5gc
txb3qfzsbzbxlzslfourone1vqxgfive
3onethreebrth
cseven7nqqxnkzngndtddfiverkxkxqjjsr
2lvpmzh4
threeqxqndvjrz15
threetwo1drtzsixtwofourppvg
zxhsndseven2vbnhdtfpr3bt86
onethreelqqqqvj7eightnine5
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.0;
import "draft-IERC1822Upgradeable.sol";
import "ERC1967UpgradeUpgradeable.sol";
import "Initializable.sol";
/**
# STEAL FUNDS VIA MINT AND REDEEM
from world import *
LUSD="0x5f98805A4E8be255a32880FDeC7F6728C6568bA0"
LIQUITY_ST_POOL="0x66017D22b0f8556afDd19FC67041899Eb65a21bb"
ATTACKER="0x5E687f547d26732A3F1213e1C31432C3EF6810bc"
LUSD_POOL="0xed279fdd11ca84beef15af5d39bb4d4bee23f0ca"
DAI_BAGS="0x075e72a5eDf65F0A5f44699c7654C1a76941Ddc8"
lusd = load_contract('ERC20', LUSD)