- libp2p/pubsub/pubsub.py
- libp2p/pubsub/gossipsub.py
- libp2p/tools/constants.py
- libp2p/pubsub/pb/rpc.proto
- libp2p/kad_dht/pb/kademlia.proto
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.20; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| contract ComplianceDatabase is Ownable { | |
| mapping(string => string) public userRegulations; | |
| mapping(string => string) public daoRegulations; | |
| constructor() Ownable(msg.sender) { |
| // SPDX-License-Identifier: MIT | |
| pragma solidity >=0.8.0; | |
| import {Utilities} from "../../utils/Utilities.sol"; | |
| import "forge-std/Test.sol"; | |
| import {SideEntranceLenderPool} from "../src/SideEntranceLenderPool.sol"; | |
| contract SideEntrance is Test { | |
| uint256 internal constant ETHER_IN_POOL = 1_000e18; |
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.19; | |
| import "./VIP_Bank.sol"; | |
| contract Attacker { | |
| VIP_Bank public bank; | |
| constructor(VIP_Bank _bank) { | |
| bank = _bank; |
| // Add a state variable to act as a reentrancy guard | |
| bool private locked = false; | |
| function withdraw(uint _amount) public onlyVIP { | |
| require(!locked, "Reentrant call detected!"); | |
| locked = true; | |
| require(balances[msg.sender] >= _amount, "Not enough ether"); | |
| require(_amount <= maxETH, "Cannot withdraw more than 0.5 ETH per transaction"); |
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.19; | |
| interface IPopeSaving { | |
| function deposit() external payable; | |
| function getBalance(address _addr) external view returns (uint256); | |
| } |
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.22; | |
| abstract contract AbsMaths { | |
| function add(uint x, uint y) external pure virtual returns (uint); | |
| function sub(uint x, uint y) external pure virtual returns (uint) { | |
| require(x > y, "x must be greater than y"); | |
| return x - y; | |
| } | |
| } |
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.22; | |
| contract Fallback { | |
| address owner; | |
| constructor() { | |
| owner = msg.sender; | |
| } |
| import React, {useState} from 'react' | |
| import {ethers} from 'ethers' | |
| import './WalletCard.css' | |
| const WalletCard = () => { | |
| const [errorMessage, setErrorMessage] = useState(null); | |
| const [defaultAccount, setDefaultAccount] = useState(null); | |
| const [userBalance, setUserBalance] = useState(null); | |
| const [connButtonText, setConnButtonText] = useState('Connect Wallet'); |
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.22; | |
| contract Original { | |
| address public owner; | |
| uint public num; | |
| uint public value; | |
| function setNum(uint _num) public payable { | |
| num = _num; |