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
| """ | |
| Credit Card Transaction Analyzer using Claude API | |
| ================================================ | |
| Author: Sandip Nallani | |
| Date: December 14, 2024 | |
| Version: 1.0 | |
| Description: | |
| ------------ | |
| A simple tool that uses the Claude API to analyze credit card transactions. |
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
| /** | |
| @notice GarageManager inherits the IGarageManager interface | |
| It has various functions to add,return and modify cars for an owner in the garage | |
| */ | |
| contract GarageManager is IGarageManager { | |
| //@dev storage variable to hold the array of cars | |
| Car[] public cars; | |
| //@dev mapping from owner to owned cars in the garage | |
| mapping (address owner => Car[] ownedCars) public carsInTheGarageByOwner; |
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
| Running 2 tests for test/foundry/minting/tests/Invariant_EthenaMinting.t.sol:Invariant_EthenaMinting | |
| [PASS] invariant_balance_USDe() (runs: 256, calls: 3840, reverts: 1675) | |
| [PASS] invariant_collateral_transfer() (runs: 256, calls: 3840, reverts: 1670) | |
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 { time, loadFixture } from "@nomicfoundation/hardhat-network-helpers"; | |
| import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; | |
| import { expect } from "chai"; | |
| import { ethers } from "hardhat"; | |
| describe("VerifySignature", function () { | |
| // We define a fixture to reuse the same setup in every test. | |
| // We use loadFixture to run this setup once, snapshot that state, | |
| // and reset Hardhat Network to that snapshopt in every test. | |
| async function deployVerifySignatureFixture() { |
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
| //SPDX-License-Identifier: MIT | |
| pragma solidity =0.8.0; | |
| contract Betting { | |
| address payable public owner; | |
| uint256 public minimumBet; | |
| uint256 public totalBetsOne; | |
| uint256 public totalBetsTwo; | |
| address payable[] public players; | |
| struct Player { | |
| uint256 amountBet; |
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
| const { expect } = require("chai"); | |
| const { ethers } = require("hardhat"); | |
| const { BigNumber } = require("ethers"); | |
| const { parseEther, formatEther } = require("ethers/lib/utils"); | |
| const {time,loadFixture} = require("@nomicfoundation/hardhat-network-helpers"); | |
| const { anyValue } = require("@nomicfoundation/hardhat-chai-matchers/withArgs"); | |
| const { parse } = require("dotenv"); | |
| const { format } = require("path"); | |
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
| // SPDX-License-Identifier: GPL-2.0-or-later | |
| pragma solidity =0.7.6; | |
| /// @title IWETH contract interface that has all the ERC20 capabilities | |
| /// @author Sandip Nallani | |
| /// @notice This will be inherited by the WETH contract and then by the DepositAndWithdraw.sol contract to wrap/UnWrap user's ETH | |
| interface IWETH { | |
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
| // SPDX-License-Identifier: GPL-2.0-or-later | |
| pragma solidity =0.7.6; | |
| import "@openzeppelin/contracts/math/SafeMath.sol"; | |
| import "hardhat/console.sol"; | |
| import "./IWETH.sol"; | |
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
| //SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.13; | |
| abstract contract NoDelegateCall{ | |
| address public immutable originalOwner; | |
| constructor() { | |
| originalOwner = address(this); |
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
| //SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.13; | |
| abstract contract NoDelegateCall{ | |
| address private immutable original; | |
| constructor() { | |
| original = address(this); | |
| } | |
NewerOlder