From d8ffb2230e3a61251bea7b4e5031413ecfe24e61 Mon Sep 17 00:00:00 2001 From: Ryan Pate Date: Tue, 19 Mar 2024 15:40:46 -0700 Subject: [PATCH] fix(core): Update Drip versions to handle funding requests --- .changeset/chatty-squids-sleep.md | 7 ++ packages/contracts/src/networks.ts | 90 +++++++++---------- .../core/src/languages/solidity/predeploys.ts | 2 +- 3 files changed, 53 insertions(+), 46 deletions(-) create mode 100644 .changeset/chatty-squids-sleep.md diff --git a/.changeset/chatty-squids-sleep.md b/.changeset/chatty-squids-sleep.md new file mode 100644 index 000000000..e764410e4 --- /dev/null +++ b/.changeset/chatty-squids-sleep.md @@ -0,0 +1,7 @@ +--- +'@sphinx-labs/contracts': patch +'@sphinx-labs/core': patch +'@sphinx-labs/plugins': patch +--- + +Reduce Drippie interval diff --git a/packages/contracts/src/networks.ts b/packages/contracts/src/networks.ts index ca7b5326f..bdc53e50d 100644 --- a/packages/contracts/src/networks.ts +++ b/packages/contracts/src/networks.ts @@ -118,7 +118,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -149,7 +149,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -180,7 +180,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.025', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -211,7 +211,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -236,7 +236,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.025', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -261,7 +261,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -286,7 +286,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -311,7 +311,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -335,7 +335,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.05', requiredEnvVariables: ['BNB_MAINNET_URL'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -359,7 +359,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['BNB_TESTNET_URL'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -389,7 +389,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['GNOSIS_MAINNET_URL'], networkType: 'Mainnet', - dripVersion: 2, + dripVersion: 3, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -414,7 +414,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['CHIADO_RPC_URL'], networkType: 'Testnet', - dripVersion: 2, + dripVersion: 3, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -446,7 +446,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.025', requiredEnvVariables: ['INFURA_API_KEY'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -471,7 +471,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['INFURA_API_KEY'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -502,7 +502,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.025', requiredEnvVariables: ['POLYGON_ZKEVM_MAINNET_URL'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -526,7 +526,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['POLYGON_ZKEVM_TESTNET_URL'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -551,7 +551,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['INFURA_API_KEY'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -576,7 +576,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['INFURA_API_KEY'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -600,7 +600,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['FANTOM_MAINNET_RPC_URL'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -618,7 +618,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['FANTOM_TESTNET_RPC_URL'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -649,7 +649,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.025', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -680,7 +680,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['ALCHEMY_API_KEY'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -705,7 +705,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['INFURA_API_KEY'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -730,7 +730,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['INFURA_API_KEY'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -754,7 +754,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['MOONRIVER_RPC_URL'], queryFilterBlockLimit: 500, - dripVersion: 1, + dripVersion: 2, networkType: 'Mainnet', decimals: 18, legacyTx: false, @@ -780,7 +780,7 @@ export const SPHINX_NETWORKS: Array = [ requiredEnvVariables: ['MOONBEAM_RPC_URL'], queryFilterBlockLimit: 500, networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, legacyTx: false, actionGasLimitBuffer: false, @@ -805,7 +805,7 @@ export const SPHINX_NETWORKS: Array = [ requiredEnvVariables: ['MOONBASE_ALPHA_RPC_URL'], queryFilterBlockLimit: 500, networkType: 'Testnet', - dripVersion: 2, + dripVersion: 3, decimals: 18, legacyTx: false, actionGasLimitBuffer: false, @@ -830,7 +830,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['FUSE_RPC_URL'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, legacyTx: true, decimals: 18, queryFilterBlockLimit: 2000, @@ -847,7 +847,7 @@ export const SPHINX_NETWORKS: Array = [ currency: 'EVMOS', dripSize: '1', requiredEnvVariables: ['EVMOS_RPC_URL'], - dripVersion: 1, + dripVersion: 2, networkType: 'Mainnet', decimals: 18, queryFilterBlockLimit: 2000, @@ -866,7 +866,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.015', requiredEnvVariables: ['EVMOS_TESTNET_RPC_URL'], networkType: 'Testnet', - dripVersion: 2, + dripVersion: 3, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -891,7 +891,7 @@ export const SPHINX_NETWORKS: Array = [ currency: 'KAVA', dripSize: '1', requiredEnvVariables: ['KAVA_RPC_URL'], - dripVersion: 1, + dripVersion: 2, networkType: 'Mainnet', legacyTx: true, decimals: 18, @@ -910,7 +910,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '1', requiredEnvVariables: ['KAVA_TESTNET_RPC_URL'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, legacyTx: true, decimals: 18, queryFilterBlockLimit: 2000, @@ -927,7 +927,7 @@ export const SPHINX_NETWORKS: Array = [ currency: 'OKT', dripSize: '1', requiredEnvVariables: ['OKTC_RPC_URL'], - dripVersion: 2, + dripVersion: 3, queryFilterBlockLimit: 500, networkType: 'Mainnet', legacyTx: true, @@ -959,7 +959,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.025', requiredEnvVariables: ['SCROLL_RPC_URL'], networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -983,7 +983,7 @@ export const SPHINX_NETWORKS: Array = [ dripSize: '0.15', requiredEnvVariables: ['SCROLL_TESTNET_RPC_URL'], networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -1007,10 +1007,10 @@ export const SPHINX_NETWORKS: Array = [ currency: 'RBTC', dripSize: '0.001', requiredEnvVariables: ['ROOTSTOCK_RPC_URL'], - dripVersion: 3, + dripVersion: 4, networkType: 'Mainnet', legacyTx: true, - decimals: 8, + decimals: 18, queryFilterBlockLimit: 2000, actionGasLimitBuffer: true, useHigherMaxGasLimit: true, @@ -1032,10 +1032,10 @@ export const SPHINX_NETWORKS: Array = [ currency: 'RBTC', dripSize: '0.001', requiredEnvVariables: ['ROOTSTOCK_TESTNET_RPC_URL'], - dripVersion: 3, + dripVersion: 4, networkType: 'Testnet', legacyTx: true, - decimals: 8, + decimals: 18, queryFilterBlockLimit: 2000, actionGasLimitBuffer: true, useHigherMaxGasLimit: true, @@ -1058,7 +1058,7 @@ export const SPHINX_NETWORKS: Array = [ currency: 'ETH', dripSize: '0.025', networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -1088,7 +1088,7 @@ export const SPHINX_NETWORKS: Array = [ currency: 'ETH', dripSize: '0.15', networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -1118,7 +1118,7 @@ export const SPHINX_NETWORKS: Array = [ currency: 'ETH', dripSize: '0.025', networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -1148,7 +1148,7 @@ export const SPHINX_NETWORKS: Array = [ currency: 'ETH', dripSize: '0.15', networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -1176,7 +1176,7 @@ export const SPHINX_NETWORKS: Array = [ currency: 'ETH', dripSize: '0.025', networkType: 'Testnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, @@ -1200,7 +1200,7 @@ export const SPHINX_NETWORKS: Array = [ currency: 'ETH', dripSize: '0.025', networkType: 'Mainnet', - dripVersion: 1, + dripVersion: 2, decimals: 18, queryFilterBlockLimit: 2000, legacyTx: false, diff --git a/packages/core/src/languages/solidity/predeploys.ts b/packages/core/src/languages/solidity/predeploys.ts index d1885a11e..35e99fdb0 100644 --- a/packages/core/src/languages/solidity/predeploys.ts +++ b/packages/core/src/languages/solidity/predeploys.ts @@ -205,7 +205,7 @@ export const assignManagedServiceRoles = async ( baseDripName + (currentDripVersion > 0 ? `_${currentDripVersion}` : '') const reentrant = false - const interval = 30 + const interval = 1 const dripcheck = getCheckBalanceLowAddress() const checkparams = AbiCoder.defaultAbiCoder().encode( ['address', 'uint256'],