Skip to content

Instantly share code, notes, and snippets.

View Zeegaths's full-sized avatar
🎯
Focusing

Mary Wangui Zeegaths

🎯
Focusing
View GitHub Profile
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!");
}
// 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() {
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;
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>;
// 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 {
@Zeegaths
Zeegaths / icp
Last active August 3, 2024 20:16
713237613
595690140