- On Linux, you can install GPG via your package manager. For example, on Debian-based systems, you can use
sudo apt-get install gnupg.
- Open a terminal or command prompt and run the following command:
gpg --full-generate-key| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.23; | |
| import { IERC20 } from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; | |
| import { SafeERC20 } from "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; | |
| import { EnumerableSet } from "lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol"; | |
| import { IERC20Metadata } from "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol"; | |
| import { ReentrancyGuardTransient } from "lib/openzeppelin-contracts/contracts/utils/ReentrancyGuardTransient.sol"; | |
| import { Ownable2StepUpgradeable } from "lib/openzeppelin-contracts-upgradeable/contracts/access/Ownable2StepUpgradeable.sol"; | |
| import { ERC20PermitUpgradeable } from "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol"; |
| require("dotenv").config("./.env") | |
| const { Chain, Common, Hardfork } = require('@ethereumjs/common') | |
| const { FeeMarketEIP1559Transaction } = require('@ethereumjs/tx') | |
| const { bytesToHex } = require('@ethereumjs/util') | |
| const axios = require("axios") | |
| async function main() { | |
| const common = new Common({ chain: Chain.Sepolia, hardfork: Hardfork.Cancun }) | |
| const txData = { |
| from : "" // holder address | |
| message = { | |
| holder: from, | |
| spender: "0x3d573f130125E1a510b65f2aD258ec4f88Ca7023", | |
| nonce: 0, // update nonce | |
| expiry: 1706806653, // update expiry | |
| allowed: true, | |
| }; | |
| msgParams = JSON.stringify({ |
| getAmountOut | |
| uint amountInWithFee = amountIn.mul(997); | |
| uint numerator = amountInWithFee.mul(reserveOut); | |
| uint denominator = reserveIn.mul(1000).add(amountInWithFee); | |
| amountOut = numerator / denominator; | |
| (_tokenOutReserves * _tokenInReserves) | |
| amountOut = _tokenOutReserves - ------------------------------------- | |
| (_tokenOutReserves + _amountTokenIn) |
| #!/bin/bash | |
| # function to start the instances | |
| start_instances() { | |
| for i in {1..5}; do | |
| node ./multicalls.js & | |
| sleep 10 | |
| done | |
| } |
| SELECT * FROM pg_stat_activity; | |
| SELECT pg_cancel_backend(15762); | |
| SELECT pg_terminate_backend(15762); | |
| select c.oid,pg_catalog.pg_total_relation_size(c.oid) as total_rel_size,pg_catalog.pg_relation_size(c.oid) as rel_size | |
| FROM pg_class c WHERE c.relnamespace=$1 | |
| select * from pg_class; |
| delete from "alphaPROD".public."fhusd3CRV_data" a using "alphaPROD".public."fhusd3CRV_data" b where a.id < b.id and a.block = b.block; | |
| delete from "alphaPROD".public."3Crv_data" a using "alphaPROD".public."3Crv_data" b where a.id < b.id and a.block = b.block; | |
| delete from "alphaPROD".public."aAAVE_data" a using "alphaPROD".public."aAAVE_data" b where a.id < b.id and a.block = b.block; | |
| delete from "alphaPROD".public."aBAT_data" a using "alphaPROD".public."aBAT_data" b where a.id < b.id and a.block = b.block; | |
| delete from "alphaPROD".public."aBUSD_data" a using "alphaPROD".public."aBUSD_data" b where a.id < b.id and a.block = b.block; |
| vacuum full "alphaPROD".public."fhusd3CRV_data"; | |
| vacuum full "alphaPROD".public."3Crv_data"; | |
| vacuum full "alphaPROD".public."aAAVE_data"; | |
| vacuum full "alphaPROD".public."aBAT_data"; | |
| vacuum full "alphaPROD".public."aBUSD_data"; |
| // SPDX-License-Identifier:MIT | |
| pragma solidity ^0.8.10; | |
| contract ABIEncoding { | |
| function fun(bool _x, uint _y) public pure returns(bytes4 _data) { | |
| // _data = this.fun.selector; | |
| _data = bytes4(keccak256("fun(bool,uint256)")); | |
| } | |