From 0a3f7b96ec2c43492c049a95df78be321e3e3d1b Mon Sep 17 00:00:00 2001 From: Pablo Veyrat Date: Fri, 10 Jan 2025 18:08:39 +0100 Subject: [PATCH 1/4] feat: add fragment contract --- hardhat.config.ts | 696 ++++++++++++++++++++++++++++++++++++++++++++++ lib/forge-std | 1 + 2 files changed, 697 insertions(+) create mode 100644 hardhat.config.ts create mode 160000 lib/forge-std diff --git a/hardhat.config.ts b/hardhat.config.ts new file mode 100644 index 0000000..7b62326 --- /dev/null +++ b/hardhat.config.ts @@ -0,0 +1,696 @@ +/// ENVVAR +// - ENABLE_GAS_REPORT +// - CI +// - RUNS +import 'dotenv/config'; +import 'hardhat-contract-sizer'; +import 'hardhat-spdx-license-identifier'; +import 'hardhat-deploy'; +import 'hardhat-abi-exporter'; +import '@nomicfoundation/hardhat-chai-matchers'; /** NEW FEATURE - https://hardhat.org/hardhat-chai-matchers/docs/reference#.revertedwithcustomerror */ +import '@nomicfoundation/hardhat-toolbox'; /** NEW FEATURE */ +import '@openzeppelin/hardhat-upgrades'; +import '@nomiclabs/hardhat-truffle5'; +import '@nomiclabs/hardhat-solhint'; +import '@tenderly/hardhat-tenderly'; +import '@typechain/hardhat'; + +import { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } from 'hardhat/builtin-tasks/task-names'; +import { HardhatUserConfig, subtask } from 'hardhat/config'; +import { HardhatNetworkAccountsUserConfig } from 'hardhat/types'; +import yargs from 'yargs'; + +import { accounts, etherscanKey, getMerklAccount, getMnemonic, getPkey, nodeUrl } from './utils/network'; + +// Otherwise, ".sol" files from "test" are picked up during compilation and throw an error +subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(async (_, __, runSuper) => { + const paths = await runSuper(); + return paths.filter((p: string) => !p.includes('/test/foundry/')); +}); + +const accountsPkey = [getPkey()]; +const accountsMerklDeployer: HardhatNetworkAccountsUserConfig = getMerklAccount(); + + +const config: HardhatUserConfig = { + solidity: { + compilers: [ + { + version: '0.8.24', + settings: { + optimizer: { + enabled: true, + runs: 100000, + }, + viaIR: false, + }, + }, + { + version: '0.8.17', + settings: { + optimizer: { + enabled: true, + runs: 100000, + }, + viaIR: false, + }, + }, + ], + overrides: { + 'contracts/DistributionCreator.sol': { + version: '0.8.17', + settings: { + optimizer: { + enabled: true, + runs: 1, + }, + viaIR: false, + }, + }, + 'contracts/mock/DistributionCreatorUpdatable.sol': { + version: '0.8.17', + settings: { + optimizer: { + enabled: true, + runs: 1, + }, + viaIR: false, + }, + }, + 'contracts/deprecated/OldDistributionCreator.sol': { + version: '0.8.17', + settings: { + optimizer: { + enabled: true, + runs: 1, + }, + viaIR: false, + }, + }, + }, + }, + defaultNetwork: 'hardhat', + // For the lists of Chain ID: https://chainlist.org + networks: { + hardhat: { + live: false, + blockGasLimit: 125e5, + initialBaseFeePerGas: 0, + hardfork: 'london', + accounts: accounts('worldchain'), + forking: { + enabled: false, + // Mainnet + /* + url: nodeUrl('fork'), + blockNumber: 19127150, + */ + // Polygon + /* + url: nodeUrl('forkpolygon'), + blockNumber: 39517477, + */ + // Optimism + /* + url: nodeUrl('optimism'), + blockNumber: 17614765, + */ + // Arbitrum + /* + url: nodeUrl('arbitrum'), + blockNumber: 19356874, + */ + /* + url: nodeUrl('arbitrum'), + blockNumber: 19356874, + */ + /* + url: nodeUrl('polygonzkevm'), + blockNumber: 3214816, + */ + /* + url: nodeUrl('coredao'), + */ + /* + url: nodeUrl('gnosis'), + blockNumber: 14188687, + */ + /* + url: nodeUrl('immutable'), + blockNumber: 3160413, + */ + /* + url: nodeUrl('manta'), + blockNumber: 1479731, + */ + /* + url: nodeUrl('scroll'), + blockNumber: 3670869, + */ + // url: nodeUrl('blast'), + // blockNumber: 421659, + // url: nodeUrl('fraxtal'), + // blockNumber: 6644000, + url: nodeUrl('worldchain'), + blockNumber: 4521455, + }, + mining: + { + auto: false, + interval: 1000, + }, + chainId: 42220, + }, + polygon: { + live: true, + url: nodeUrl('polygon'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 3, + chainId: 137, + gasPrice: 'auto', + verify: { + etherscan: { + apiKey: etherscanKey('polygon'), + }, + }, + }, + fantom: { + live: true, + url: nodeUrl('fantom'), + accounts: [getPkey()], + gas: 'auto', + chainId: 250, + verify: { + etherscan: { + apiKey: etherscanKey('fantom'), + }, + }, + }, + mainnet: { + live: true, + url: nodeUrl('mainnet'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 1, + verify: { + etherscan: { + apiKey: etherscanKey('mainnet'), + }, + }, + }, + optimism: { + live: true, + url: nodeUrl('optimism'), + accounts: [getPkey()], + gas: 'auto', + chainId: 10, + verify: { + etherscan: { + apiKey: etherscanKey('optimism'), + }, + }, + }, + arbitrum: { + live: true, + url: nodeUrl('arbitrum'), + accounts: [getPkey()], + gas: 'auto', + chainId: 42161, + verify: { + etherscan: { + apiKey: etherscanKey('arbitrum'), + }, + }, + }, + avalanche: { + live: true, + url: nodeUrl('avalanche'), + accounts: [getPkey()], + gas: 'auto', + chainId: 43114, + verify: { + etherscan: { + apiKey: etherscanKey('avalanche'), + }, + }, + }, + aurora: { + live: true, + url: nodeUrl('aurora'), + accounts: [getPkey()], + gas: 'auto', + chainId: 1313161554, + verify: { + etherscan: { + apiKey: etherscanKey('aurora'), + }, + }, + }, + bsc: { + live: true, + url: nodeUrl('bsc'), + accounts: [getPkey()], + gas: 60000000, + gasMultiplier: 3, + gasPrice: 'auto', + chainId: 56, + verify: { + etherscan: { + apiKey: etherscanKey('bsc'), + }, + }, + }, + gnosis: { + live: true, + url: nodeUrl('gnosis'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 3, + chainId: 100, + initialBaseFeePerGas: 2000000000, + verify: { + etherscan: { + apiKey: etherscanKey('gnosis'), + }, + }, + }, + polygonzkevm: { + live: true, + url: nodeUrl('polygonzkevm'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 1101, + verify: { + etherscan: { + apiKey: etherscanKey('polygonzkevm'), + }, + }, + }, + base: { + live: true, + url: nodeUrl('base'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 8453, + verify: { + etherscan: { + apiKey: etherscanKey('base'), + }, + }, + }, + bob: { + live: true, + url: nodeUrl('bob'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 60808, + verify: { + etherscan: { + apiKey: etherscanKey('bob'), + }, + }, + }, + linea: { + live: true, + url: nodeUrl('linea'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 59144, + verify: { + etherscan: { + apiKey: etherscanKey('linea'), + }, + }, + }, + zksync: { + live: true, + url: nodeUrl('zksync'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 324, + ethNetwork: nodeUrl('mainnet'), + verifyURL: 'https://zksync2-mainnet-explorer.zksync.io/contract_verification', + verify: { + etherscan: { + apiKey: etherscanKey('zksync'), + }, + }, + zksync: true, + }, + mantle: { + live: true, + url: nodeUrl('mantle'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 5000, + verify: { + etherscan: { + apiKey: etherscanKey('mantle'), + }, + }, + }, + filecoin: { + live: true, + url: nodeUrl('filecoin'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 314, + verify: { + etherscan: { + apiKey: etherscanKey('filecoin'), + }, + }, + }, + blast: { + live: true, + url: nodeUrl('blast'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 81457, + verify: { + etherscan: { + apiKey: etherscanKey('blast'), + }, + }, + }, + mode: { + live: true, + url: nodeUrl('mode'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 34443, + verify: { + etherscan: { + apiKey: etherscanKey('mode'), + }, + }, + }, + thundercore: { + live: true, + url: nodeUrl('thundercore'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 108, + verify: { + etherscan: { + apiKey: etherscanKey('thundercore'), + }, + }, + }, + coredao: { + live: true, + url: nodeUrl('coredao'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 1116, + verify: { + etherscan: { + apiKey: etherscanKey('coredao'), + }, + }, + }, + xlayer: { + live: true, + url: nodeUrl('xlayer'), + accounts: [getPkey()], + gas: 'auto', + chainId: 196, + }, + taiko: { + live: true, + url: nodeUrl('taiko'), + accounts: [getPkey()], + gas: 'auto', + chainId: 167000, + }, + fuse: { + live: true, + url: nodeUrl('fuse'), + accounts: [getPkey()], + gas: 'auto', + chainId: 122, + }, + immutablezkevm: { + live: true, + url: nodeUrl('immutablezkevm'), + accounts: [getPkey()], + gas: 'auto', + gasPrice: 'auto', + gasMultiplier: 1.3, + chainId: 13371, + verify: { + etherscan: { + apiKey: etherscanKey('immutablezkevm'), + }, + }, + }, + immutable: { + live: true, + url: nodeUrl('immutable'), + accounts: [getPkey()], + gas: 'auto', + chainId: 13371, + verify: { + etherscan: { + apiKey: etherscanKey('immutable'), + }, + }, + }, + scroll: { + live: true, + url: nodeUrl('scroll'), + accounts: [getPkey()], + gas: 'auto', + chainId: 534352, + verify: { + etherscan: { + apiKey: etherscanKey('scroll'), + }, + }, + }, + manta: { + live: true, + url: nodeUrl('manta'), + accounts: [getPkey()], + gas: 'auto', + chainId: 169, + verify: { + etherscan: { + apiKey: etherscanKey('manta'), + }, + }, + }, + sei: { + live: true, + url: nodeUrl('sei'), + accounts: [getPkey()], + gas: 'auto', + chainId: 1329, + verify: { + etherscan: { + apiKey: etherscanKey('sei'), + }, + }, + }, + celo: { + live: true, + url: nodeUrl('celo'), + accounts: [getPkey()], + gas: 'auto', + chainId: 42220, + verify: { + etherscan: { + apiKey: etherscanKey('celo'), + }, + }, + }, + fraxtal: { + live: true, + url: nodeUrl('fraxtal'), + accounts: accountsMerklDeployer, + gas: 'auto', + chainId: 252, + verify: { + etherscan: { + apiKey: etherscanKey('fraxtal'), + }, + }, + }, + astar: { + live: true, + url: nodeUrl('astar'), + accounts: [getPkey()], + gas: 'auto', + gasPrice: 'auto', + chainId: 592, + verify: { + etherscan: { + apiKey: etherscanKey('astar'), + }, + }, + }, + astarzkevm: { + live: true, + url: nodeUrl('astarzkevm'), + accounts: [getPkey()], + gas: 'auto', + gasPrice: 'auto', + chainId: 3776, + verify: { + etherscan: { + apiKey: etherscanKey('astarzkevm'), + }, + }, + }, + rootstock: { + live: true, + url: nodeUrl('rootstock'), + accounts: accounts('rootstock'), + gas: 'auto', + chainId: 30, + verify: { + etherscan: { + apiKey: etherscanKey('rootstock'), + }, + }, + }, + moonbeam: { + live: true, + url: nodeUrl('moonbeam'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 1284, + verify: { + etherscan: { + apiKey: etherscanKey('moonbeam'), + }, + }, + }, + skale: { + live: true, + url: nodeUrl('skale'), + accounts: [getPkey()], + gas: 'auto', + gasMultiplier: 1.3, + chainId: 2046399126, + verify: { + etherscan: { + apiKey: etherscanKey('skale'), + }, + }, + }, + worldchain: { + live: true, + url: nodeUrl('worldchain'), + accounts: accountsMerklDeployer, + gas: 'auto', + chainId: 480, + verify: { + etherscan: { + apiKey: etherscanKey('worldchain'), + }, + }, + }, + }, + paths: { + sources: './contracts', + tests: './test', + cache: 'cache-hh', + }, + namedAccounts: { + deployer: 0, + guardian: 1, + governor: 2, + proxyAdmin: 3, + alice: 4, + bob: 5, + charlie: 6, + }, + contractSizer: { + alphaSort: true, + runOnCompile: false, + disambiguatePaths: false, + }, + gasReporter: { + currency: 'USD', + outputFile: 'gas-report.txt', + }, + spdxLicenseIdentifier: { + overwrite: false, + runOnCompile: true, + }, + abiExporter: { + path: './export/abi', + clear: true, + flat: true, + spacing: 2, + }, + etherscan: { + // apiKey: process.env.ETHERSCAN_API_KEY, + apiKey: { + worldchain: etherscanKey('worldchain'), + }, + customChains: [ + { + network: 'taiko', + chainId: 167000, + urls: { + apiURL: 'https://api.taikoscan.io/api', + browserURL: 'https://taikoscan.io/', + }, + }, + { + network: 'celo', + chainId: 42220, + urls: { + apiURL: 'https://api.celoscan.io/api', + browserURL: 'https://celoscan.io/', + }, + }, + { + network: 'fraxtal', + chainId: 252, + urls: { + apiURL: 'https://api.fraxscan.com/api', + browserURL: 'https://fraxscan.com/', + }, + }, + { + network: 'skale', + chainId: 2046399126, + urls: { + apiURL: 'https://internal-hubs.explorer.mainnet.skalenodes.com:10001/api', + browserURL: 'https://elated-tan-skat.explorer.mainnet.skalenodes.com/', + }, + }, + { + network: 'worldchain', + chainId: 480, + urls: { + apiURL: 'https://worldchain-mainnet.explorer.alchemy.com/api', + browserURL: 'https://worldchain-mainnet.explorer.alchemy.com/', + }, + }, + ], + }, + typechain: { + outDir: 'typechain', + target: 'ethers-v5', + }, +}; + +export default config; diff --git a/lib/forge-std b/lib/forge-std new file mode 160000 index 0000000..cb69e9c --- /dev/null +++ b/lib/forge-std @@ -0,0 +1 @@ +Subproject commit cb69e9c07fbd002819c8c6c8db3caeab76b90d6b From 05866d53af09d0d2846d8a43cf009fe119c19904 Mon Sep 17 00:00:00 2001 From: Pablo Veyrat Date: Fri, 10 Jan 2025 18:09:08 +0100 Subject: [PATCH 2/4] rm: hardhat --- hardhat.config.ts | 696 ---------------------------------------------- 1 file changed, 696 deletions(-) delete mode 100644 hardhat.config.ts diff --git a/hardhat.config.ts b/hardhat.config.ts deleted file mode 100644 index 7b62326..0000000 --- a/hardhat.config.ts +++ /dev/null @@ -1,696 +0,0 @@ -/// ENVVAR -// - ENABLE_GAS_REPORT -// - CI -// - RUNS -import 'dotenv/config'; -import 'hardhat-contract-sizer'; -import 'hardhat-spdx-license-identifier'; -import 'hardhat-deploy'; -import 'hardhat-abi-exporter'; -import '@nomicfoundation/hardhat-chai-matchers'; /** NEW FEATURE - https://hardhat.org/hardhat-chai-matchers/docs/reference#.revertedwithcustomerror */ -import '@nomicfoundation/hardhat-toolbox'; /** NEW FEATURE */ -import '@openzeppelin/hardhat-upgrades'; -import '@nomiclabs/hardhat-truffle5'; -import '@nomiclabs/hardhat-solhint'; -import '@tenderly/hardhat-tenderly'; -import '@typechain/hardhat'; - -import { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } from 'hardhat/builtin-tasks/task-names'; -import { HardhatUserConfig, subtask } from 'hardhat/config'; -import { HardhatNetworkAccountsUserConfig } from 'hardhat/types'; -import yargs from 'yargs'; - -import { accounts, etherscanKey, getMerklAccount, getMnemonic, getPkey, nodeUrl } from './utils/network'; - -// Otherwise, ".sol" files from "test" are picked up during compilation and throw an error -subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(async (_, __, runSuper) => { - const paths = await runSuper(); - return paths.filter((p: string) => !p.includes('/test/foundry/')); -}); - -const accountsPkey = [getPkey()]; -const accountsMerklDeployer: HardhatNetworkAccountsUserConfig = getMerklAccount(); - - -const config: HardhatUserConfig = { - solidity: { - compilers: [ - { - version: '0.8.24', - settings: { - optimizer: { - enabled: true, - runs: 100000, - }, - viaIR: false, - }, - }, - { - version: '0.8.17', - settings: { - optimizer: { - enabled: true, - runs: 100000, - }, - viaIR: false, - }, - }, - ], - overrides: { - 'contracts/DistributionCreator.sol': { - version: '0.8.17', - settings: { - optimizer: { - enabled: true, - runs: 1, - }, - viaIR: false, - }, - }, - 'contracts/mock/DistributionCreatorUpdatable.sol': { - version: '0.8.17', - settings: { - optimizer: { - enabled: true, - runs: 1, - }, - viaIR: false, - }, - }, - 'contracts/deprecated/OldDistributionCreator.sol': { - version: '0.8.17', - settings: { - optimizer: { - enabled: true, - runs: 1, - }, - viaIR: false, - }, - }, - }, - }, - defaultNetwork: 'hardhat', - // For the lists of Chain ID: https://chainlist.org - networks: { - hardhat: { - live: false, - blockGasLimit: 125e5, - initialBaseFeePerGas: 0, - hardfork: 'london', - accounts: accounts('worldchain'), - forking: { - enabled: false, - // Mainnet - /* - url: nodeUrl('fork'), - blockNumber: 19127150, - */ - // Polygon - /* - url: nodeUrl('forkpolygon'), - blockNumber: 39517477, - */ - // Optimism - /* - url: nodeUrl('optimism'), - blockNumber: 17614765, - */ - // Arbitrum - /* - url: nodeUrl('arbitrum'), - blockNumber: 19356874, - */ - /* - url: nodeUrl('arbitrum'), - blockNumber: 19356874, - */ - /* - url: nodeUrl('polygonzkevm'), - blockNumber: 3214816, - */ - /* - url: nodeUrl('coredao'), - */ - /* - url: nodeUrl('gnosis'), - blockNumber: 14188687, - */ - /* - url: nodeUrl('immutable'), - blockNumber: 3160413, - */ - /* - url: nodeUrl('manta'), - blockNumber: 1479731, - */ - /* - url: nodeUrl('scroll'), - blockNumber: 3670869, - */ - // url: nodeUrl('blast'), - // blockNumber: 421659, - // url: nodeUrl('fraxtal'), - // blockNumber: 6644000, - url: nodeUrl('worldchain'), - blockNumber: 4521455, - }, - mining: - { - auto: false, - interval: 1000, - }, - chainId: 42220, - }, - polygon: { - live: true, - url: nodeUrl('polygon'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 3, - chainId: 137, - gasPrice: 'auto', - verify: { - etherscan: { - apiKey: etherscanKey('polygon'), - }, - }, - }, - fantom: { - live: true, - url: nodeUrl('fantom'), - accounts: [getPkey()], - gas: 'auto', - chainId: 250, - verify: { - etherscan: { - apiKey: etherscanKey('fantom'), - }, - }, - }, - mainnet: { - live: true, - url: nodeUrl('mainnet'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 1, - verify: { - etherscan: { - apiKey: etherscanKey('mainnet'), - }, - }, - }, - optimism: { - live: true, - url: nodeUrl('optimism'), - accounts: [getPkey()], - gas: 'auto', - chainId: 10, - verify: { - etherscan: { - apiKey: etherscanKey('optimism'), - }, - }, - }, - arbitrum: { - live: true, - url: nodeUrl('arbitrum'), - accounts: [getPkey()], - gas: 'auto', - chainId: 42161, - verify: { - etherscan: { - apiKey: etherscanKey('arbitrum'), - }, - }, - }, - avalanche: { - live: true, - url: nodeUrl('avalanche'), - accounts: [getPkey()], - gas: 'auto', - chainId: 43114, - verify: { - etherscan: { - apiKey: etherscanKey('avalanche'), - }, - }, - }, - aurora: { - live: true, - url: nodeUrl('aurora'), - accounts: [getPkey()], - gas: 'auto', - chainId: 1313161554, - verify: { - etherscan: { - apiKey: etherscanKey('aurora'), - }, - }, - }, - bsc: { - live: true, - url: nodeUrl('bsc'), - accounts: [getPkey()], - gas: 60000000, - gasMultiplier: 3, - gasPrice: 'auto', - chainId: 56, - verify: { - etherscan: { - apiKey: etherscanKey('bsc'), - }, - }, - }, - gnosis: { - live: true, - url: nodeUrl('gnosis'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 3, - chainId: 100, - initialBaseFeePerGas: 2000000000, - verify: { - etherscan: { - apiKey: etherscanKey('gnosis'), - }, - }, - }, - polygonzkevm: { - live: true, - url: nodeUrl('polygonzkevm'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 1101, - verify: { - etherscan: { - apiKey: etherscanKey('polygonzkevm'), - }, - }, - }, - base: { - live: true, - url: nodeUrl('base'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 8453, - verify: { - etherscan: { - apiKey: etherscanKey('base'), - }, - }, - }, - bob: { - live: true, - url: nodeUrl('bob'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 60808, - verify: { - etherscan: { - apiKey: etherscanKey('bob'), - }, - }, - }, - linea: { - live: true, - url: nodeUrl('linea'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 59144, - verify: { - etherscan: { - apiKey: etherscanKey('linea'), - }, - }, - }, - zksync: { - live: true, - url: nodeUrl('zksync'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 324, - ethNetwork: nodeUrl('mainnet'), - verifyURL: 'https://zksync2-mainnet-explorer.zksync.io/contract_verification', - verify: { - etherscan: { - apiKey: etherscanKey('zksync'), - }, - }, - zksync: true, - }, - mantle: { - live: true, - url: nodeUrl('mantle'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 5000, - verify: { - etherscan: { - apiKey: etherscanKey('mantle'), - }, - }, - }, - filecoin: { - live: true, - url: nodeUrl('filecoin'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 314, - verify: { - etherscan: { - apiKey: etherscanKey('filecoin'), - }, - }, - }, - blast: { - live: true, - url: nodeUrl('blast'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 81457, - verify: { - etherscan: { - apiKey: etherscanKey('blast'), - }, - }, - }, - mode: { - live: true, - url: nodeUrl('mode'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 34443, - verify: { - etherscan: { - apiKey: etherscanKey('mode'), - }, - }, - }, - thundercore: { - live: true, - url: nodeUrl('thundercore'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 108, - verify: { - etherscan: { - apiKey: etherscanKey('thundercore'), - }, - }, - }, - coredao: { - live: true, - url: nodeUrl('coredao'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 1116, - verify: { - etherscan: { - apiKey: etherscanKey('coredao'), - }, - }, - }, - xlayer: { - live: true, - url: nodeUrl('xlayer'), - accounts: [getPkey()], - gas: 'auto', - chainId: 196, - }, - taiko: { - live: true, - url: nodeUrl('taiko'), - accounts: [getPkey()], - gas: 'auto', - chainId: 167000, - }, - fuse: { - live: true, - url: nodeUrl('fuse'), - accounts: [getPkey()], - gas: 'auto', - chainId: 122, - }, - immutablezkevm: { - live: true, - url: nodeUrl('immutablezkevm'), - accounts: [getPkey()], - gas: 'auto', - gasPrice: 'auto', - gasMultiplier: 1.3, - chainId: 13371, - verify: { - etherscan: { - apiKey: etherscanKey('immutablezkevm'), - }, - }, - }, - immutable: { - live: true, - url: nodeUrl('immutable'), - accounts: [getPkey()], - gas: 'auto', - chainId: 13371, - verify: { - etherscan: { - apiKey: etherscanKey('immutable'), - }, - }, - }, - scroll: { - live: true, - url: nodeUrl('scroll'), - accounts: [getPkey()], - gas: 'auto', - chainId: 534352, - verify: { - etherscan: { - apiKey: etherscanKey('scroll'), - }, - }, - }, - manta: { - live: true, - url: nodeUrl('manta'), - accounts: [getPkey()], - gas: 'auto', - chainId: 169, - verify: { - etherscan: { - apiKey: etherscanKey('manta'), - }, - }, - }, - sei: { - live: true, - url: nodeUrl('sei'), - accounts: [getPkey()], - gas: 'auto', - chainId: 1329, - verify: { - etherscan: { - apiKey: etherscanKey('sei'), - }, - }, - }, - celo: { - live: true, - url: nodeUrl('celo'), - accounts: [getPkey()], - gas: 'auto', - chainId: 42220, - verify: { - etherscan: { - apiKey: etherscanKey('celo'), - }, - }, - }, - fraxtal: { - live: true, - url: nodeUrl('fraxtal'), - accounts: accountsMerklDeployer, - gas: 'auto', - chainId: 252, - verify: { - etherscan: { - apiKey: etherscanKey('fraxtal'), - }, - }, - }, - astar: { - live: true, - url: nodeUrl('astar'), - accounts: [getPkey()], - gas: 'auto', - gasPrice: 'auto', - chainId: 592, - verify: { - etherscan: { - apiKey: etherscanKey('astar'), - }, - }, - }, - astarzkevm: { - live: true, - url: nodeUrl('astarzkevm'), - accounts: [getPkey()], - gas: 'auto', - gasPrice: 'auto', - chainId: 3776, - verify: { - etherscan: { - apiKey: etherscanKey('astarzkevm'), - }, - }, - }, - rootstock: { - live: true, - url: nodeUrl('rootstock'), - accounts: accounts('rootstock'), - gas: 'auto', - chainId: 30, - verify: { - etherscan: { - apiKey: etherscanKey('rootstock'), - }, - }, - }, - moonbeam: { - live: true, - url: nodeUrl('moonbeam'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 1284, - verify: { - etherscan: { - apiKey: etherscanKey('moonbeam'), - }, - }, - }, - skale: { - live: true, - url: nodeUrl('skale'), - accounts: [getPkey()], - gas: 'auto', - gasMultiplier: 1.3, - chainId: 2046399126, - verify: { - etherscan: { - apiKey: etherscanKey('skale'), - }, - }, - }, - worldchain: { - live: true, - url: nodeUrl('worldchain'), - accounts: accountsMerklDeployer, - gas: 'auto', - chainId: 480, - verify: { - etherscan: { - apiKey: etherscanKey('worldchain'), - }, - }, - }, - }, - paths: { - sources: './contracts', - tests: './test', - cache: 'cache-hh', - }, - namedAccounts: { - deployer: 0, - guardian: 1, - governor: 2, - proxyAdmin: 3, - alice: 4, - bob: 5, - charlie: 6, - }, - contractSizer: { - alphaSort: true, - runOnCompile: false, - disambiguatePaths: false, - }, - gasReporter: { - currency: 'USD', - outputFile: 'gas-report.txt', - }, - spdxLicenseIdentifier: { - overwrite: false, - runOnCompile: true, - }, - abiExporter: { - path: './export/abi', - clear: true, - flat: true, - spacing: 2, - }, - etherscan: { - // apiKey: process.env.ETHERSCAN_API_KEY, - apiKey: { - worldchain: etherscanKey('worldchain'), - }, - customChains: [ - { - network: 'taiko', - chainId: 167000, - urls: { - apiURL: 'https://api.taikoscan.io/api', - browserURL: 'https://taikoscan.io/', - }, - }, - { - network: 'celo', - chainId: 42220, - urls: { - apiURL: 'https://api.celoscan.io/api', - browserURL: 'https://celoscan.io/', - }, - }, - { - network: 'fraxtal', - chainId: 252, - urls: { - apiURL: 'https://api.fraxscan.com/api', - browserURL: 'https://fraxscan.com/', - }, - }, - { - network: 'skale', - chainId: 2046399126, - urls: { - apiURL: 'https://internal-hubs.explorer.mainnet.skalenodes.com:10001/api', - browserURL: 'https://elated-tan-skat.explorer.mainnet.skalenodes.com/', - }, - }, - { - network: 'worldchain', - chainId: 480, - urls: { - apiURL: 'https://worldchain-mainnet.explorer.alchemy.com/api', - browserURL: 'https://worldchain-mainnet.explorer.alchemy.com/', - }, - }, - ], - }, - typechain: { - outDir: 'typechain', - target: 'ethers-v5', - }, -}; - -export default config; From 7d9c531f39c0d4d847e7583e24a7713623d6dc05 Mon Sep 17 00:00:00 2001 From: Pablo Veyrat Date: Thu, 6 Feb 2025 09:47:32 +0100 Subject: [PATCH 3/4] fix: stuff --- contracts/partners/tokenWrappers/PufferPointTokenWrapper.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/partners/tokenWrappers/PufferPointTokenWrapper.sol b/contracts/partners/tokenWrappers/PufferPointTokenWrapper.sol index d775ad8..f9b7f4e 100644 --- a/contracts/partners/tokenWrappers/PufferPointTokenWrapper.sol +++ b/contracts/partners/tokenWrappers/PufferPointTokenWrapper.sol @@ -160,7 +160,7 @@ contract PufferPointTokenWrapper is UUPSHelper, ERC20Upgradeable { uint256 length = userAllVestings.length; while (i < length && i <= maxClaimIndex) { VestingID storage userCurrentVesting = userAllVestings[i]; - if (block.timestamp > userCurrentVesting.unlockTimestamp) { + if (block.timestamp > userCurrentVesting.unlockTimestamp && block.timestamp > 1740816009) { amountClaimable += userCurrentVesting.amount; nextClaimIndex = ++i; } else break; From ec31ddfe8e04087be35d3fbd9d336c2c2de31066 Mon Sep 17 00:00:00 2001 From: Pablo Veyrat Date: Thu, 20 Feb 2025 17:11:05 +0100 Subject: [PATCH 4/4] fix: puffer --- scripts/deployPufferPointTokenWrapper.s.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/deployPufferPointTokenWrapper.s.sol b/scripts/deployPufferPointTokenWrapper.s.sol index 49b7757..4ad6bc6 100644 --- a/scripts/deployPufferPointTokenWrapper.s.sol +++ b/scripts/deployPufferPointTokenWrapper.s.sol @@ -40,13 +40,14 @@ contract DeployPufferPointTokenWrapper is BaseScript { // Deploy implementation PufferPointTokenWrapper implementation = new PufferPointTokenWrapper(); console.log("PufferPointTokenWrapper Implementation:", address(implementation)); - + /* // Deploy proxy ERC1967Proxy proxy = new ERC1967Proxy(address(implementation), ""); console.log("PufferPointTokenWrapper Proxy:", address(proxy)); // Initialize PufferPointTokenWrapper(address(proxy)).initialize(underlying, cliffDuration, manager, distributionCreator); + */ vm.stopBroadcast(); } }