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 python3 | |
# -*- coding: utf-8 -*- | |
# | |
# SPDX-License-Identifier: GPL-3.0 | |
# | |
# GNU Radio Python Flow Graph | |
# Title: Not titled yet | |
# Author: ilamanov | |
# GNU Radio version: 3.10.10.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
contract YourContract { | |
address aaveContractAddress; | |
function initiateFlashLoan(address erc20token, uint256 amount) { | |
Aave(aaveContractAddress).flashLoan(address(this), erc20token, amount); | |
} | |
function executeOperation(address erc20token, uint256 amount, uint256 fee) { | |
// you're now approved for the "amount". do whatever you want with it |
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
contract OKPC is ERC721A { | |
address public metadataAddress; | |
function setMetadataAddress(address addr) external onlyOwner { | |
if (addr == address(0)) revert InvalidAddress(); | |
metadataAddress = addr; | |
emit MetadataAddressUpdated(addr); | |
} | |
function tokenURI(uint256 pcId) public view override returns (string memory) { |
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
contract YourNFTContract is ERC721 { | |
bytes32 private _allowlistMerkleRoot; | |
function setMerkleRoot(bytes32 newRoot) external onlyOwner { | |
_allowlistMerkleRoot = newRoot; | |
} | |
modifier onlyIfValidMerkleProof(bytes32[] calldata proof) { | |
// leaf is just the address of the sender | |
bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); |
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
contract MarketDownBad { | |
uint256 public supply = 1; | |
uint256 public lastSoldPrice; | |
function price() public view returns (uint256) { | |
return 1000 / supply; | |
} | |
function panicSell() public { | |
lastSoldPrice = price(); |
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
contract BuyOptionForUNIToken { | |
address public constant UNIERC20Address = "0x...."; | |
uint public price; | |
uint public endPeriod; | |
address public contractHolder; | |
constructor(uint _price, uint _endPeriod, address _contractHolder) { | |
price = _price; | |
endPeriod = _endPeriod; |
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.8.13; | |
import {ERC721} from "./ERC721.sol"; | |
contract Runes is ERC721 { | |
uint256 public constant RUNE_OF_ALPHA = 6; | |
uint256 public lastDelta; | |
uint256 public lastPurchaseBasefee; |
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
/** | |
* @title CanonicalTransactionChain | |
* @dev The Canonical Transaction Chain (CTC) contract is an append-only log of transactions | |
* which must be applied to the rollup state. It defines the ordering of rollup transactions by | |
* writing them to the 'CTC:batches' instance of the Chain Storage Container. | |
* The CTC also allows any account to 'enqueue' an L2 transaction, which will require that the | |
* Sequencer will eventually append it to the rollup state. | |
* | |
*/ | |
contract CanonicalTransactionChain is ICanonicalTransactionChain, Lib_AddressResolver { |
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
contract OVM_FraudVerifier is Lib_AddressResolver, OVM_FraudContributor, iOVM_FraudVerifier { | |
/** | |
* Finalizes the fraud verification process. | |
* @param _preStateRoot State root before the fraudulent transaction. | |
* @param _preStateRootBatchHeader Batch header for the provided pre-state root. | |
* @param _preStateRootProof Inclusion proof for the provided pre-state root. | |
* @param _txHash The transaction for the state root | |
* @param _postStateRoot State root after the fraudulent transaction. | |
* @param _postStateRootBatchHeader Batch header for the provided post-state root. | |
* @param _postStateRootProof Inclusion proof for the provided post-state root. |
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
/** | |
* @title CanonicalTransactionChain | |
* @dev The Canonical Transaction Chain (CTC) contract is an append-only log of transactions | |
* which must be applied to the rollup state. It defines the ordering of rollup transactions by | |
* writing them to the 'CTC:batches' instance of the Chain Storage Container. | |
* The CTC also allows any account to 'enqueue' an L2 transaction, which will require that the | |
* Sequencer will eventually append it to the rollup state. | |
* | |
*/ | |
contract CanonicalTransactionChain is ICanonicalTransactionChain, Lib_AddressResolver { |
NewerOlder