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.8.19; | |
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | |
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; | |
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | |
contract UUPSImpl is Initializable, OwnableUpgradeable, UUPSUpgradeable { | |
constructor() { |
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: GPL-3.0 | |
pragma solidity 0.7.0; | |
contract IsItVulnerable { | |
bytes public currentCode; | |
function setReferralCode( | |
string memory code, |
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
// this line is added to create a gist. Empty file is not allowed. |
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: BUSL-1.1 | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; | |
import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; | |
import "../src/exchange/DepositHandler.sol"; | |
import "../src/exchange/WithdrawalHandler.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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity 0.8.19; | |
import "hardhat/console.sol"; | |
import "./ERC20/IERC20.sol"; | |
import "./ERC20/ERC20.sol"; | |
import "hardhat/console.sol"; | |
// user 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4 |
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: MIT | |
pragma solidity 0.8.17; | |
// Allows user to swap deposited token for another | |
contract SwapProtocol { | |
// token address -> user address balance | |
mapping(address => mapping(address => uint256)) balances; | |
// ... |
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: GPL-3.0 | |
pragma solidity 0.8.17; | |
interface ICallback { | |
function beforeExecution() external; | |
} | |
/** Exploit Desc: **/ | |
// The GasGriefer is used as a `callbackContract` on a swapOrder |
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
from app.models.library import LibraryItem, LibraryTag, LibraryTagCategory, TaggedLibraryItem | |
flow_type = 0 | |
# Grab channel category | |
channel_category = LibraryTagCategory.objects.get(library_type=flow_type, name="Channel") | |
# Make new Email and SMS Tag |
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
from app.services.events import EventLogService | |
from app.services.plans import AVAILABLE_PLANS | |
from app.models import Company, CompanyStatistic | |
from collections import namedtuple | |
import csv | |
event_service = EventLogService() | |
custom_stats = [] | |
viewed_and_ordered_stats = [] | |
high_plans = [] |
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
from app.services.events import EventLogService | |
from app.services.plans import AVAILABLE_PLANS | |
from app.models import Company, CompanyStatistic | |
from collections import namedtuple | |
event_service = EventLogService() | |
custom_stats = [] | |
started_checkout_stats = [] | |
high_plans = [] | |
rows = [] |