This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## pragma optimize codesize | |
# pragma enable-decimals | |
""" | |
@title CurveStableSwapNG | |
@author Curve.Fi | |
@license Copyright (c) Curve.Fi, 2020-2023 - all rights reserved | |
@notice Stableswap implementation for up to 8 coins with no rehypothecation, | |
i.e. the AMM does not deposit tokens into other contracts. The Pool contract also | |
records exponential moving averages for coins relative to coin 0. | |
@dev Asset Types: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## pragma optimize codesize | |
# pragma evm-version shanghai | |
# pragma enable-decimals | |
""" | |
@title CurveStableSwapNG | |
@author Curve.Fi | |
@license Copyright (c) Curve.Fi, 2020-2023 - all rights reserved | |
@notice Stableswap implementation for up to 8 coins with no rehypothecation, | |
i.e. the AMM does not deposit tokens into other contracts. The Pool contract also | |
records exponential moving averages for coins relative to coin 0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2024-04-14T17:08:55.2635958Z Current runner version: '2.315.0' | |
2024-04-14T17:08:55.2663253Z ##[group]Operating System | |
2024-04-14T17:08:55.2663887Z Ubuntu | |
2024-04-14T17:08:55.2664206Z 22.04.4 | |
2024-04-14T17:08:55.2664653Z LTS | |
2024-04-14T17:08:55.2664970Z ##[endgroup] | |
2024-04-14T17:08:55.2665360Z ##[group]Runner Image | |
2024-04-14T17:08:55.2665866Z Image: ubuntu-22.04 | |
2024-04-14T17:08:55.2666266Z Version: 20240407.1.0 | |
2024-04-14T17:08:55.2667230Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20240407.1/images/ubuntu/Ubuntu2204-Readme.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
with open("benchmark_control.easm", "w") as f: | |
print("PUSH1 251", file=f) | |
print("PUSH1 1", file=f) | |
for _ in range(10_000): # stay roughly within codesize limit, still large enough for benchmark | |
print("DUP2 MUL", file=f) | |
print("DUP1 DUP1 POP POP", file=f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# access_control.vy | |
owner: address | |
def __init__(): | |
self.owner = msg.sender | |
def check_owner(): | |
assert msg.sender == self.owner | |
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allowances: HashMap[address, HashMap[address, uint256]] | |
balanceOf: HashMap[address, uint256] | |
totalSupply: uint256 | |
bundle: ERC20Bundle | |
def __init__(): | |
... # do things with initializing and totalSupply | |
@external |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: | |
# install asan fork of vyper 0.3.10 (`pip install git+https://github.com/charles-cooper/vyper@asan`) | |
# change `import boa` to `import boa; import boa_asan` in scripts | |
from eth.exceptions import VMError | |
import boa.environment | |
class MemoryAccessViolation(VMError): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from openai_plugin import Plugin | |
class DefiLlama(Plugin): | |
def __init__(self): | |
self.base_url = "https://api.llama.fi" | |
def fetch_data(self, endpoint): | |
try: | |
response = requests.get(f"{self.base_url}/{endpoint}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @license MIT | |
# @author Philogy <https://github.com/Philogy> | |
from eth_utils.abi import function_signature_to_4byte_selector | |
from eth_utils.crypto import keccak | |
from math import ceil, log2 | |
import pyperclip | |
def find_reselector_nonce(selectors, mask): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x6020610585600039600051630000055c5261055c61002963000000003961055c6020016300000000f3600436101561000d57610551565b60003560e01c34610557576307a1018e81186102f557600435600401610400813511610557578035806040526020820181816060375050506029b3156100c0576010610460527f4a65726b20626f7920752072206f75740000000000000000000000000000000061048052610460506104605180610480018182601f600182031916810190500336823750506308c379a06104205260206104405261046051601f6001820319168101905060440161043cfd5b336029b463ee9387f26104605260208061048052806104800160405180825260208201818183606060045afa9050505080518060208301018182601f600182031916810190500336823750508051602001601f60018203191681019050905081015050333b15610557576000600061044461047c6000335af1610148573d600060003e3d6000fd5b60006000b3600a81116105575780156102e757905b6004810260010180b36104605260018101b36104805260028101b36104a05260038101b36104c0525061048051610580526104a0516105a0526040610560526105608051602082012090506104e052610460516104c051602061055c60003960005180820282158284830414171561055757905090506127 |
NewerOlder