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.13; | |
/** | |
* An experiment in Soul Bound Tokens (SBT's) following Vitalik's | |
* co-authored whitepaper at: | |
* https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4105763 | |
* | |
* I propose for a rename to Non-Transferable Tokens NTT's | |
*/ |
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.0; | |
import "./AuctionContract.sol"; | |
contract Attacker { | |
AuctionContract auction; | |
constructor(address auctionAddress) { | |
auction = AuctionContract(auctionAddress); |
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.0; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
interface Vault { | |
function deposit() external payable; | |
function withdraw(uint256 amount) external; | |
function withdrawAll() external payable; |
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.7; | |
contract Vault { | |
mapping(address => uint256) public accountBalance; | |
function withdraw(uint256 amount) public { | |
uint256 currentBalance = accountBalance[msg.sender]; | |
require(amount <= currentBalance, "Account balance is not enough"); | |
accountBalance[msg.sender] -= amount; |
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.7; | |
contract Multisig { | |
uint256 minSignatures = 3; | |
address private contractOwner; | |
mapping(address => bool) private owners; | |
struct Transaction { | |
address to; | |
uint256 amount; |
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
const uniSwapV1FactoryAddress = "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95"; | |
const usdcAddress = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"; | |
const factoryABI = [ | |
{ | |
name: "NewExchange", | |
inputs: [ | |
{ type: "address", name: "token", indexed: true }, | |
{ type: "address", name: "exchange", indexed: true }, | |
], | |
anonymous: false, |