This file contains hidden or 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 "EtherStore.sol"; | |
| contract Attack { | |
| EtherStore public etherStore; | |
| // intialize the etherStore variable with the contract address | |
| constructor(address _etherStoreAddress) { | |
| etherStore = EtherStore(_etherStoreAddress); | |
| } |
This file contains hidden or 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 EtherStore { | |
| uint256 public withdrawalLimit = 1 ether; | |
| mapping(address => uint256) public lastWithdrawTime; | |
| mapping(address => uint256) public balances; | |
| function depositFunds() external payable { | |
| balances[msg.sender] += msg.value; | |
| } |
This file contains hidden or 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
| /** | |
| *Submitted for verification at Etherscan.io on 2021-09-05 | |
| */ | |
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.0; | |
| /// [MIT License] | |
| /// @title Base64 |
This file contains hidden or 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 React, { useEffect, useState } from "react"; | |
| import { ethers } from "ethers"; | |
| import './App.css'; | |
| import wavePortal from './utils/WavePortal.json'; | |
| const App = () => { | |
| const [currentAccount, setCurrentAccount] = useState(""); | |
| const [allWaves, setAllWaves] = useState([]); | |
| const contractAddress = "0xd5f08a0ae197482FA808cE84E00E97d940dBD26E"; |
This file contains hidden or 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
| let storage = [] | |
| let callbackFNConstructor = (index) => (error, contractData) => { | |
| storage[index] = contractData | |
| } | |
| for(var i = 0; i < 6; i++) { | |
| web3.eth.getStorageAt(contract.address, i, callbackFNConstructor(i)) | |
| } |
This file contains hidden or 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
| // In this example, we will go over how to look up a Celo address that is registered with a phone number with ODIS | |
| // 1. Import the appropriate packages | |
| const ContractKit = require('@celo/contractkit') | |
| const OdisUtils = require('@celo/identity').OdisUtils | |
| // 2. Import these packages to help with private key management for the example | |
| const privateKeyToAddress = require('@celo/utils/lib/address').privateKeyToAddress | |
| const normalizeAddressWith0x = require('@celo/utils/lib/address').normalizeAddressWith0x |
This file contains hidden or 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.6.6; | |
| import './GateKeeperOne.sol'; | |
| import "https://github.com/OpenZeppelin/zeppelin-solidity/contracts/math/SafeMath.sol"; | |
| contract GateKeeperOneAttack { | |
| using SafeMath for uint256; | |
| bytes8 key; | |
| GatekeeperOne gateKeeper; |
This file contains hidden or 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.6.10; | |
| import "https://github.com/OpenZeppelin/zeppelin-solidity/contracts/math/SafeMath.sol"; | |
| contract Reentrance { | |
| using SafeMath for uint256; | |
| mapping(address => uint) public balances; | |
| function donate(address _to) public payable { |
This file contains hidden or 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.4.17; | |
| contract Auction { | |
| // Data | |
| //Structure to hold details of the item | |
| struct Item { | |
| uint itemId; // id of the item | |
| uint[] itemTokens; //tokens bid in favor of the item | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.