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
595690140 |
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
713237613 |
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.20; | |
// import "@openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
// import "@openzeppelin-contracts/contracts/access/Ownable.sol"; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
contract Artify is ERC721URIStorage { |
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
use starknet::ContractAddress; | |
#[starknet::interface] | |
pub trait ITodoList<TContractState> { | |
fn addTodo(ref self: TContractState, description: felt252, deadline: u32) -> bool; | |
fn updateTodo(ref self: TContractState, index: u8, description: felt252, deadline: u32) -> bool; | |
fn getTodos(self: @TContractState) -> Array<Todo::Todo>; |
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 {Address} from "@openzeppelin/contracts/utils/Address.sol"; | |
import {SideEntranceLenderPool} from "./SideEntranceLenderPool.sol"; | |
interface IFlashLoanEtherReceiver { | |
function execute() external payable; | |
} | |
contract Exploit is IFlashLoanEtherReceiver { | |
using Address for address 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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.19; | |
contract VIP_Bank { | |
address public manager; | |
mapping(address => uint) public balances; | |
mapping(address => bool) public VIP; | |
uint public maxETH = 0.5 ether; | |
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
function withdraw(uint _amount) public onlyVIP { | |
require( | |
_amount <= maxETH, | |
"Cannot withdraw more than 0.5 ETH per transaction" | |
); | |
require(balances[msg.sender] >= _amount, "Not enough ether"); | |
balances[msg.sender] -= _amount; | |
(bool success, ) = payable(msg.sender).call{value: _amount}(""); | |
require(success, "Withdraw Failed!"); | |
} |
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.24; | |
contract DepositFunds { | |
//track the balance | |
mapping(address => uint) deposits; | |
//deposit function | |
function deposit(uint _amount) 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.17; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract ZarahToken is ERC721URIStorage, Ownable { | |
constructor() ERC721("ZarahToken", "ZT") Ownable (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
import { | |
time, | |
loadFixture, | |
} from "@nomicfoundation/hardhat-toolbox/network-helpers"; | |
import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; | |
import { expect } from "chai"; | |
import { ethers } from "hardhat"; | |
describe("Todo List", function () { | |
async function deployTodoList() { |
NewerOlder