This file contains hidden or 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
from typing import Iterator | |
blockchain: tuple[list[int], ...] = ([], [0], [1, 2], [], [], [], [3, 4], [5, 6, 7], [8, 9]) | |
def get_txns(blk): |
This file contains hidden or 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
# ERC4626: Yield-Bearing Vaults | |
# Definitions: | |
# - asset: The underlying token managed by the Vault. | |
# Has units defined by the corresponding ERC20 contract. | |
# - share: The token of the Vault. Has a ratio of underlying tokens | |
# exchanged on deposit/withdraw (defined by the vault) | |
# - slippage: any difference between advertised share price and economic realities of | |
# depositto or withdrawal from the Vault, which is not accounted by fees | |
# - deposit fee: fee charged on deposit to Vault |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am fubuloubu on github. | |
* I am fubuloubu (https://keybase.io/fubuloubu) on keybase. | |
* I have a public key ASD1RVh-Qho7GFM1CZ8vK4CUq4xWYevx8hJPIUME-UjrYgo | |
To claim this, I am signing this object: |
This file contains hidden or 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
# Implementation of overflow-safe version of exponentiation | |
# Prototyped for the EVM environment of Vyper | |
# from https://en.wikipedia.org/wiki/Exponentiation_by_squaring | |
import math | |
import pytest | |
from hypothesis import given, strategies as st, settings | |
This file contains hidden or 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 random | |
from web3 import Web3, EthereumTesterProvider | |
from vyper import compile_code as compiler | |
from eth_tester.exceptions import TransactionFailed | |
w3 = Web3(EthereumTesterProvider()) | |
max_stakers = 5 |