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 json | |
import pandas as pd | |
from web3 import Web3 | |
AVAX_NODE = "https://api.avax.network/ext/bc/C/rpc" | |
SMOL_CREEPS_ADDRESS = "0x2cd4dbcbfc005f8096c22579585fb91097d8d259" | |
provider = Web3(Web3.HTTPProvider(AVAX_NODE)) | |
with open("abi.json", "r") as f: | |
abi = json.load(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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.5.16; | |
interface ERC3156FlashBorrowerInterface { | |
/** | |
* @dev Receive a flash loan. | |
* @param initiator The initiator of the loan. | |
* @param token The loan currency. | |
* @param amount The amount of tokens lent. |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.5.16; | |
interface ERC3156FlashBorrowerInterface { | |
/** | |
* @dev Receive a flash loan. | |
* @param initiator The initiator of the loan. | |
* @param token The loan currency. | |
* @param amount The amount of tokens lent. |
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 solidity 0.5.16; | |
pragma experimental ABIEncoderV2; | |
// uniswap | |
import { IUniswapExchange } from "./IUniswapExchange.sol"; | |
// dydx | |
import { IErc20 } from "./IErc20.sol"; | |
// compound |
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 solidity 0.5.16; | |
pragma experimental ABIEncoderV2; | |
// uniswap | |
import { IUniswapExchange } from "./IUniswapExchange.sol"; | |
// dydx | |
import { IErc20 } from "./IErc20.sol"; | |
// compound |
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 solidity 0.5.16; | |
pragma experimental ABIEncoderV2; | |
// uniswap | |
import { IUniswapExchange } from "./IUniswapExchange.sol"; | |
// compound | |
import "compound-protocol/contracts/CErc20.sol"; | |
import "compound-protocol/contracts/CEther.sol"; | |
import "compound-protocol/contracts/Comptroller.sol"; |
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 solidity 0.5.16; | |
pragma experimental ABIEncoderV2; | |
// uniswap | |
import { IUniswapExchange } from "./IUniswapExchange.sol"; | |
// dydx | |
import { IErc20 } from "./IErc20.sol"; | |
// compound |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.5.16; | |
/** | |
* @title Compound's InterestRateModel Interface | |
* @author Compound | |
*/ | |
contract InterestRateModel { | |
/// @notice Indicator that this is an InterestRateModel contract (for inspection) |