Skip to content

Instantly share code, notes, and snippets.

View haythemsellami's full-sized avatar

Haythem Sellami haythemsellami

View GitHub Profile

Keybase proof

I hereby claim:

  • I am haythemsellami on github.
  • I am haythem96 (https://keybase.io/haythem96) on keybase.
  • I have a public key ASAMNPtK5ve9zFsc8hxju1Yocle_H-VFoDGyuE0OlI1pvwo

To claim this, I am signing this object:

@haythemsellami
haythemsellami / GammaControllerGoerli.sol
Created September 12, 2022 10:53
Goerli deployment of Controller implementation for GammaProtocol, this one include the Ribbon borrowable pool
// File: contracts/packages/oz/upgradeability/Initializable.sol
// openzeppelin-contracts-upgradeable v3.0.0
/**
* SPDX-License-Identifier: UNLICENSED
*/
pragma solidity =0.6.10;
pragma experimental ABIEncoderV2;
const { ethers } = require("ethers");
const { DefenderRelaySigner, DefenderRelayProvider } = require('defender-relay-client/lib/ethers');
const AddressBookAbi = [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
@haythemsellami
haythemsellami / FlatMockChainlinkAndPricer.sol
Last active June 26, 2021 08:24
flattened mock for chainlink and pricer contract
// File: contracts/interfaces/OracleInterface.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.10;
interface OracleInterface {
function isLockingPeriodOver(address _asset, uint256 _expiryTimestamp) external view returns (bool);
function isDisputePeriodOver(address _asset, uint256 _expiryTimestamp) external view returns (bool);
@haythemsellami
haythemsellami / FlatOracleV2-0-0.sol
Created June 24, 2021 22:43
Flattened gamma oracle v2.0.0 contract
/**
* SPDX-License-Identifier: UNLICENSED
*/
pragma solidity =0.6.10;
// File: contracts/interfaces/OpynPricerInterface.sol
interface OpynPricerInterface {
function getPrice() external view returns (uint256);
@haythemsellami
haythemsellami / FlatPayableProxyController.sol
Created June 23, 2021 09:21
Flattened PayableProxyController.sol
/**
* SPDX-License-Identifier: UNLICENSED
*/
pragma solidity =0.6.10;
pragma experimental ABIEncoderV2;
// File: contracts/external/canonical-weth/WETH9.sol
// Copyright (C) 2015, 2016, 2017 Dapphub
@haythemsellami
haythemsellami / FlatMarginCalculatorV2-0-0.sol
Last active June 25, 2021 07:00
Flattened MarginCalculator.sol v2.0.0
/**
* SPDX-License-Identifier: UNLICENSED
*/
pragma solidity =0.6.10;
pragma experimental ABIEncoderV2;
// File: contracts/packages/oz/SafeMath.sol
/**
// File: contracts/packages/oz/upgradeability/Proxy.sol
// SPDX-License-Identifier: UNLICENSED
// openzeppelin-contracts-upgradeable v3.0.0
pragma solidity 0.6.10;
/**
* @title Proxy
* @dev Gives the possibility to delegate any call to a foreign implementation.
@haythemsellami
haythemsellami / FlatControllerV2-0-0.sol
Last active June 24, 2021 22:30
Flattened Controller.sol v2.0.0
/**
* SPDX-License-Identifier: UNLICENSED
*/
pragma solidity =0.6.10;
pragma experimental ABIEncoderV2;
// File: contracts/packages/oz/upgradeability/Initializable.sol
/**
pragma solidity ^0.4.19;
interface TheCyberGatekeeperTwo {
function enter(bytes32 _passcode, bytes8 _gateKey) external returns (bool);
}
contract GetInYolo {
address private constant theCyberGatekeeperTwo = 0xbB902569a997D657e8D10B82Ce0ec5A5983C8c7C;
function GetInYolo() public {