diff --git a/ABI/crucibleRouterAbi.json b/ABI/crucibleRouterAbi.json new file mode 100644 index 0000000..3ea8633 --- /dev/null +++ b/ABI/crucibleRouterAbi.json @@ -0,0 +1,1189 @@ +[ + { + "inputs":[ + + ], + "stateMutability":"nonpayable", + "type":"constructor" + }, + { + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"address", + "name":"quorumId", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"subscriber", + "type":"address" + } + ], + "name":"AddedToQuorum", + "type":"event" + }, + { + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"address", + "name":"admin", + "type":"address" + } + ], + "name":"AdminSet", + "type":"event" + }, + { + "anonymous":false, + "inputs":[ + { + "indexed":true, + "internalType":"address", + "name":"previousOwner", + "type":"address" + }, + { + "indexed":true, + "internalType":"address", + "name":"newOwner", + "type":"address" + } + ], + "name":"OwnershipTransferred", + "type":"event" + }, + { + "anonymous":false, + "inputs":[ + { + "components":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"uint64", + "name":"groupId", + "type":"uint64" + }, + { + "internalType":"uint16", + "name":"minSignatures", + "type":"uint16" + }, + { + "internalType":"uint8", + "name":"ownerGroupId", + "type":"uint8" + } + ], + "indexed":false, + "internalType":"struct MultiSigCheckable.Quorum", + "name":"quorum", + "type":"tuple" + } + ], + "name":"QuorumCreated", + "type":"event" + }, + { + "anonymous":false, + "inputs":[ + { + "components":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"uint64", + "name":"groupId", + "type":"uint64" + }, + { + "internalType":"uint16", + "name":"minSignatures", + "type":"uint16" + }, + { + "internalType":"uint8", + "name":"ownerGroupId", + "type":"uint8" + } + ], + "indexed":false, + "internalType":"struct MultiSigCheckable.Quorum", + "name":"quorum", + "type":"tuple" + } + ], + "name":"QuorumUpdated", + "type":"event" + }, + { + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"address", + "name":"quorumId", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"subscriber", + "type":"address" + } + ], + "name":"RemovedFromQuorum", + "type":"event" + }, + { + "inputs":[ + + ], + "name":"GOVERNANCE_GROUP_ID_MAX", + "outputs":[ + { + "internalType":"uint16", + "name":"", + "type":"uint16" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"NAME", + "outputs":[ + { + "internalType":"string", + "name":"", + "type":"string" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"VERSION", + "outputs":[ + { + "internalType":"string", + "name":"", + "type":"string" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"_address", + "type":"address" + }, + { + "internalType":"address", + "name":"quorumId", + "type":"address" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"addToQuorum", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"admin", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"amm", + "type":"address" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"allowAmm", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "name":"allowedAmms", + "outputs":[ + { + "internalType":"bool", + "name":"", + "type":"bool" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"cancelSaltedSignature", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"uint16", + "name":"delegatedGroupId", + "type":"uint16" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"delegateGroupId", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "name":"delegatedGroupIds", + "outputs":[ + { + "internalType":"uint16", + "name":"", + "type":"uint16" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"uint256", + "name":"amount", + "type":"uint256" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"deposit", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"address", + "name":"pairToken", + "type":"address" + }, + { + "internalType":"uint256", + "name":"baseAmount", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"pairAmount", + "type":"uint256" + }, + { + "internalType":"address", + "name":"ammRouter", + "type":"address" + }, + { + "internalType":"address", + "name":"stake", + "type":"address" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"uint256", + "name":"deadline", + "type":"uint256" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"depositAddLiquidityStake", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"uint256", + "name":"baseAmount", + "type":"uint256" + }, + { + "internalType":"address", + "name":"ammRouter", + "type":"address" + }, + { + "internalType":"address", + "name":"stake", + "type":"address" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"deadline", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"depositAddLiquidityStakeETH", + "outputs":[ + + ], + "stateMutability":"payable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"uint256", + "name":"amount", + "type":"uint256" + }, + { + "internalType":"address", + "name":"stake", + "type":"address" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"depositAndStake", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"uint256", + "name":"amount", + "type":"uint256" + } + ], + "name":"depositOpen", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"_address", + "type":"address" + } + ], + "name":"forceRemoveFromQuorum", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"quorumId", + "type":"address" + }, + { + "internalType":"uint64", + "name":"groupId", + "type":"uint64" + }, + { + "internalType":"uint16", + "name":"minSignatures", + "type":"uint16" + }, + { + "internalType":"uint8", + "name":"ownerGroupId", + "type":"uint8" + }, + { + "internalType":"address[]", + "name":"addresses", + "type":"address[]" + } + ], + "name":"initialize", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "name":"openCaps", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"address", + "name":"target", + "type":"address" + }, + { + "internalType":"enum ICrucibleToken.OverrideState", + "name":"overrideType", + "type":"uint8" + }, + { + "internalType":"uint64", + "name":"newFeeX10000", + "type":"uint64" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"overrideFee", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"owner", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"quorumList", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "name":"quorumSubscriptions", + "outputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"uint64", + "name":"groupId", + "type":"uint64" + }, + { + "internalType":"uint16", + "name":"minSignatures", + "type":"uint16" + }, + { + "internalType":"uint8", + "name":"ownerGroupId", + "type":"uint8" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "name":"quorums", + "outputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"uint64", + "name":"groupId", + "type":"uint64" + }, + { + "internalType":"uint16", + "name":"minSignatures", + "type":"uint16" + }, + { + "internalType":"uint8", + "name":"ownerGroupId", + "type":"uint8" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "name":"quorumsSubscribers", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"amm", + "type":"address" + } + ], + "name":"removeAmm", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"_address", + "type":"address" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"removeFromQuorum", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"renounceOwnership", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"_admin", + "type":"address" + } + ], + "name":"setAdmin", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"uint256", + "name":"cap", + "type":"uint256" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"setOpenCap", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"_taxDistributor", + "type":"address" + } + ], + "name":"setTaxDistributor", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"token", + "type":"address" + }, + { + "internalType":"address", + "name":"stake", + "type":"address" + }, + { + "internalType":"uint256", + "name":"amount", + "type":"uint256" + } + ], + "name":"stakeFor", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"taxDistributor", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"newOwner", + "type":"address" + } + ], + "name":"transferOwnership", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"uint64", + "name":"newFeeOnTransferX10000", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"newFeeOnWithdrawX10000", + "type":"uint64" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"uint64", + "name":"expectedGroupId", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"updateCrucibleFees", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"quorumId", + "type":"address" + }, + { + "internalType":"uint16", + "name":"minSignature", + "type":"uint16" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"uint64", + "name":"expiry", + "type":"uint64" + }, + { + "internalType":"bytes", + "name":"multiSignature", + "type":"bytes" + } + ], + "name":"updateMinSignature", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"crucible", + "type":"address" + }, + { + "internalType":"address", + "name":"newRouter", + "type":"address" + } + ], + "name":"upgradeRouter", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"bytes32", + "name":"", + "type":"bytes32" + } + ], + "name":"usedHashes", + "outputs":[ + { + "internalType":"bool", + "name":"", + "type":"bool" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "stateMutability":"payable", + "type":"receive" + } + ] \ No newline at end of file diff --git a/ABI/openStakingContractAbi.json b/ABI/openStakingContractAbi.json new file mode 100644 index 0000000..760ab84 --- /dev/null +++ b/ABI/openStakingContractAbi.json @@ -0,0 +1,993 @@ +[ + { + "inputs":[ + + ], + "stateMutability":"nonpayable", + "type":"constructor" + }, + { + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"staker", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"token", + "type":"address" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"amountPaid", + "type":"uint256" + } + ], + "name":"BasePaid", + "type":"event" + }, + { + "anonymous":false, + "inputs":[ + { + "indexed":true, + "internalType":"address", + "name":"previousOwner", + "type":"address" + }, + { + "indexed":true, + "internalType":"address", + "name":"newOwner", + "type":"address" + } + ], + "name":"OwnershipTransferred", + "type":"event" + }, + { + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"rewardToken", + "type":"address" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"rewardAmount", + "type":"uint256" + } + ], + "name":"RewardAdded", + "type":"event" + }, + { + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"staker", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "indexed":false, + "internalType":"address[]", + "name":"rewardTokens", + "type":"address[]" + }, + { + "indexed":false, + "internalType":"uint256[]", + "name":"rewards", + "type":"uint256[]" + } + ], + "name":"RewardPaid", + "type":"event" + }, + { + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"tokenAddress", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"staker", + "type":"address" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"amount", + "type":"uint256" + } + ], + "name":"Staked", + "type":"event" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"rewardToken", + "type":"address" + } + ], + "name":"addMarginalReward", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address", + "name":"rewardToken", + "type":"address" + } + ], + "name":"addMarginalRewardToPool", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + }, + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "name":"admins", + "outputs":[ + { + "internalType":"enum StakingBasics.AdminRole", + "name":"", + "type":"uint8" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"allowedRewardTokenList", + "outputs":[ + { + "internalType":"address[]", + "name":"", + "type":"address[]" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address", + "name":"rewardToken", + "type":"address" + } + ], + "name":"allowedRewardTokens", + "outputs":[ + { + "internalType":"bool", + "name":"", + "type":"bool" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"baseToken", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"creationSigner", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"factory", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address", + "name":"staker", + "type":"address" + }, + { + "internalType":"address", + "name":"rewardToken", + "type":"address" + } + ], + "name":"fakeRewardOf", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address", + "name":"rewardToken", + "type":"address" + } + ], + "name":"fakeRewardsTotal", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"freezeSweep", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"token", + "type":"address" + }, + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"address[]", + "name":"rewardTokens", + "type":"address[]" + } + ], + "name":"init", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"token", + "type":"address" + } + ], + "name":"initDefault", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "name":"inventory", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"isTokenizable", + "outputs":[ + { + "internalType":"bool", + "name":"", + "type":"bool" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"lockSeconds", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"name", + "outputs":[ + { + "internalType":"string", + "name":"_name", + "type":"string" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"owner", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"renounceOwnership", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address", + "name":"staker", + "type":"address" + }, + { + "internalType":"address[]", + "name":"rewardTokens", + "type":"address[]" + } + ], + "name":"rewardOf", + "outputs":[ + { + "internalType":"uint256[]", + "name":"amounts", + "type":"uint256[]" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address", + "name":"rewardAddress", + "type":"address" + } + ], + "name":"rewardsTotal", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address", + "name":"admin", + "type":"address" + }, + { + "internalType":"enum StakingBasics.AdminRole", + "name":"role", + "type":"uint8" + } + ], + "name":"setAdmin", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"_signer", + "type":"address" + } + ], + "name":"setCreationSigner", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"uint256", + "name":"_lockSeconds", + "type":"uint256" + } + ], + "name":"setLockSeconds", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"stake", + "outputs":[ + { + "internalType":"uint256", + "name":"stakeAmount", + "type":"uint256" + } + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"stakeFor", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address", + "name":"staker", + "type":"address" + } + ], + "name":"stakeOf", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"staker", + "type":"address" + }, + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"uint256", + "name":"allocation", + "type":"uint256" + }, + { + "internalType":"bytes32", + "name":"salt", + "type":"bytes32" + }, + { + "internalType":"bytes", + "name":"allocatorSignature", + "type":"bytes" + } + ], + "name":"stakeWithAllocation", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"stakedBalance", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "name":"stakings", + "outputs":[ + { + "internalType":"enum Staking.StakeType", + "name":"stakeType", + "type":"uint8" + }, + { + "internalType":"bool", + "name":"restrictedRewards", + "type":"bool" + }, + { + "internalType":"uint32", + "name":"contribStart", + "type":"uint32" + }, + { + "internalType":"uint32", + "name":"contribEnd", + "type":"uint32" + }, + { + "internalType":"uint32", + "name":"endOfLife", + "type":"uint32" + }, + { + "internalType":"uint32", + "name":"configHardCutOff", + "type":"uint32" + }, + { + "internalType":"uint16", + "name":"flags", + "type":"uint16" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"sweepBase", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + + ], + "name":"sweepFrozen", + "outputs":[ + { + "internalType":"bool", + "name":"", + "type":"bool" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address[]", + "name":"rewardTokens", + "type":"address[]" + } + ], + "name":"sweepRewards", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"token", + "type":"address" + }, + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"uint256", + "name":"amount", + "type":"uint256" + } + ], + "name":"sweepToken", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"newOwner", + "type":"address" + } + ], + "name":"transferOwnership", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"bytes32", + "name":"", + "type":"bytes32" + } + ], + "name":"usedHashes", + "outputs":[ + { + "internalType":"bool", + "name":"", + "type":"bool" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"uint256", + "name":"amount", + "type":"uint256" + } + ], + "name":"withdraw", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"to", + "type":"address" + }, + { + "internalType":"address", + "name":"id", + "type":"address" + } + ], + "name":"withdrawRewards", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"address", + "name":"id", + "type":"address" + }, + { + "internalType":"address", + "name":"staker", + "type":"address" + } + ], + "name":"withdrawTimeOf", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + } + ] \ No newline at end of file diff --git a/build/ABI/crucibleRouterAbi.json b/build/ABI/crucibleRouterAbi.json new file mode 100644 index 0000000..3d5e4eb --- /dev/null +++ b/build/ABI/crucibleRouterAbi.json @@ -0,0 +1,1131 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "quorumId", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "subscriber", + "type": "address" + } + ], + "name": "AddedToQuorum", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "AdminSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "uint64", + "name": "groupId", + "type": "uint64" + }, + { + "internalType": "uint16", + "name": "minSignatures", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "ownerGroupId", + "type": "uint8" + } + ], + "indexed": false, + "internalType": "struct MultiSigCheckable.Quorum", + "name": "quorum", + "type": "tuple" + } + ], + "name": "QuorumCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "uint64", + "name": "groupId", + "type": "uint64" + }, + { + "internalType": "uint16", + "name": "minSignatures", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "ownerGroupId", + "type": "uint8" + } + ], + "indexed": false, + "internalType": "struct MultiSigCheckable.Quorum", + "name": "quorum", + "type": "tuple" + } + ], + "name": "QuorumUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "quorumId", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "subscriber", + "type": "address" + } + ], + "name": "RemovedFromQuorum", + "type": "event" + }, + { + "inputs": [], + "name": "GOVERNANCE_GROUP_ID_MAX", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NAME", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "address", + "name": "quorumId", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "addToQuorum", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "amm", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "allowAmm", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowedAmms", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "cancelSaltedSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "uint16", + "name": "delegatedGroupId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "delegateGroupId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegatedGroupIds", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "address", + "name": "pairToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "baseAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pairAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "ammRouter", + "type": "address" + }, + { + "internalType": "address", + "name": "stake", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "depositAddLiquidityStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "uint256", + "name": "baseAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "ammRouter", + "type": "address" + }, + { + "internalType": "address", + "name": "stake", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "deadline", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "depositAddLiquidityStakeETH", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "stake", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "depositAndStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositOpen", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "forceRemoveFromQuorum", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "quorumId", + "type": "address" + }, + { + "internalType": "uint64", + "name": "groupId", + "type": "uint64" + }, + { + "internalType": "uint16", + "name": "minSignatures", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "ownerGroupId", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "openCaps", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "enum ICrucibleToken.OverrideState", + "name": "overrideType", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "newFeeX10000", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "overrideFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "quorumList", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "quorumSubscriptions", + "outputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "uint64", + "name": "groupId", + "type": "uint64" + }, + { + "internalType": "uint16", + "name": "minSignatures", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "ownerGroupId", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "quorums", + "outputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "uint64", + "name": "groupId", + "type": "uint64" + }, + { + "internalType": "uint16", + "name": "minSignatures", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "ownerGroupId", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "quorumsSubscribers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "amm", + "type": "address" + } + ], + "name": "removeAmm", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "removeFromQuorum", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "setOpenCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taxDistributor", + "type": "address" + } + ], + "name": "setTaxDistributor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "stake", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "stakeFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "taxDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "uint64", + "name": "newFeeOnTransferX10000", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newFeeOnWithdrawX10000", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expectedGroupId", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "updateCrucibleFees", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "quorumId", + "type": "address" + }, + { + "internalType": "uint16", + "name": "minSignature", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expiry", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "multiSignature", + "type": "bytes" + } + ], + "name": "updateMinSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "crucible", + "type": "address" + }, + { + "internalType": "address", + "name": "newRouter", + "type": "address" + } + ], + "name": "upgradeRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "usedHashes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/build/ABI/openStakingContractAbi.json b/build/ABI/openStakingContractAbi.json new file mode 100644 index 0000000..7a1115f --- /dev/null +++ b/build/ABI/openStakingContractAbi.json @@ -0,0 +1,953 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountPaid", + "type": "uint256" + } + ], + "name": "BasePaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rewardAmount", + "type": "uint256" + } + ], + "name": "RewardAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "rewardTokens", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "rewards", + "type": "uint256[]" + } + ], + "name": "RewardPaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Staked", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + } + ], + "name": "addMarginalReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + } + ], + "name": "addMarginalRewardToPool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "admins", + "outputs": [ + { + "internalType": "enum StakingBasics.AdminRole", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "allowedRewardTokenList", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + } + ], + "name": "allowedRewardTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "baseToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "creationSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + } + ], + "name": "fakeRewardOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + } + ], + "name": "fakeRewardsTotal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "freezeSweep", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address[]", + "name": "rewardTokens", + "type": "address[]" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "initDefault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "inventory", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "isTokenizable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "lockSeconds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "internalType": "address[]", + "name": "rewardTokens", + "type": "address[]" + } + ], + "name": "rewardOf", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardAddress", + "type": "address" + } + ], + "name": "rewardsTotal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "enum StakingBasics.AdminRole", + "name": "role", + "type": "uint8" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_signer", + "type": "address" + } + ], + "name": "setCreationSigner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_lockSeconds", + "type": "uint256" + } + ], + "name": "setLockSeconds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "stake", + "outputs": [ + { + "internalType": "uint256", + "name": "stakeAmount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "stakeFor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "staker", + "type": "address" + } + ], + "name": "stakeOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allocation", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "allocatorSignature", + "type": "bytes" + } + ], + "name": "stakeWithAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "stakedBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "stakings", + "outputs": [ + { + "internalType": "enum Staking.StakeType", + "name": "stakeType", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "restrictedRewards", + "type": "bool" + }, + { + "internalType": "uint32", + "name": "contribStart", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "contribEnd", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endOfLife", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "configHardCutOff", + "type": "uint32" + }, + { + "internalType": "uint16", + "name": "flags", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "sweepBase", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sweepFrozen", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address[]", + "name": "rewardTokens", + "type": "address[]" + } + ], + "name": "sweepRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sweepToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "usedHashes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "withdrawRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "staker", + "type": "address" + } + ], + "name": "withdrawTimeOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/build/src/index.js b/build/src/index.js index 2754f31..0ea5882 100644 --- a/build/src/index.js +++ b/build/src/index.js @@ -12,20 +12,69 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var _a, _b, _c; Object.defineProperty(exports, "__esModule", { value: true }); const dotenv_1 = __importDefault(require("dotenv")); const web3_1 = __importDefault(require("web3")); +const mongodb_1 = require("mongodb"); const bignumber_js_1 = require("bignumber.js"); -const standardStakingContractAbi_json_1 = __importDefault(require("../ABI/standardStakingContractAbi.json")); const tokenContractAbi_json_1 = __importDefault(require("../ABI/tokenContractAbi.json")); +const standardStaking_1 = require("./standardStaking"); +const openStaking_1 = require("./openStaking"); dotenv_1.default.config(); -const rpcUrl = process.env.RPC_URL || ""; -const web3 = new web3_1.default(rpcUrl); -console.log("Web3 instance created."); -const tokenContractAddress = "0x9f6abbf0ba6b5bfa27f4deb6597cc6ec20573fda"; -const tokenContract = new web3.eth.Contract(tokenContractAbi_json_1.default, tokenContractAddress); -console.log("Token contract instance created."); -function getTokenDecimals(tokenContractAddress) { +const DB_CONNECTION_STRING = (_a = process.env.DB_CONNECTION_STRING) !== null && _a !== void 0 ? _a : ""; +const DB_NAME = (_b = process.env.DB_NAME) !== null && _b !== void 0 ? _b : ""; +const DB_COLLECTION = (_c = process.env.DB_COLLECTION) !== null && _c !== void 0 ? _c : ""; +if (!DB_CONNECTION_STRING || !DB_NAME || !DB_COLLECTION) { + throw new Error("DB_CONNECTION_STRING, DB_NAME, or DB_COLLECTION is not defined."); +} +const getWeb3Instance = (rpcUrl) => { + if (!rpcUrl) { + throw new Error("RPC URL is undefined."); + } + return new web3_1.default(rpcUrl); +}; +// The data array containing staking contract and token contract addresses +const data = [ + // { + // stakingPoolName: "GC - VIP Pool - FRM Arbitrum", + // stakingContractAddress: "0x2bE7904c81dd3535f31B2C7B524a6ed91FDb37EC", + // stakingPoolType: "standard", + // tokenContractAddress: "0x9f6abbf0ba6b5bfa27f4deb6597cc6ec20573fda", + // chainId: "42161", + // }, + { + stakingPoolName: "cFRM Arbitrum Open Staking", + stakingContractAddress: "0xb4927895cbee88e651e0582893051b3b0f8d7db8", + stakingPoolType: "open", + tokenContractAddress: "0xe685d3cc0be48bd59082ede30c3b64cbfc0326e2", + chainId: "42161", + } +]; +const getRpcUrl = (chainId, appName = "snapshot") => __awaiter(void 0, void 0, void 0, function* () { + const client = new mongodb_1.MongoClient(DB_CONNECTION_STRING); + try { + yield client.connect(); + const db = client.db(DB_NAME); + const collection = db.collection(DB_COLLECTION); + const document = yield collection.findOne({ appName }); + if (document) { + const chainIdToNetworkMap = document.chainIdToNetworkMap; + const rpcDetails = chainIdToNetworkMap.find((item) => item.chainId === chainId); + if (rpcDetails) { + return rpcDetails.jsonRpcUrl; + } + } + } + catch (error) { + console.error("Error fetching RPC URL:", error); + } + finally { + yield client.close(); + } + return undefined; +}); +function getTokenDecimals(tokenContractAddress, web3) { return __awaiter(this, void 0, void 0, function* () { console.log("Fetching token decimals..."); let decimals = 18; @@ -40,84 +89,59 @@ function getTokenDecimals(tokenContractAddress) { return decimals; }); } -const stakingContractAddress = "0x2bE7904c81dd3535f31B2C7B524a6ed91FDb37EC"; -const stakingContract = new web3.eth.Contract(standardStakingContractAbi_json_1.default, stakingContractAddress); -console.log("Staking contract instance created."); -function getUniqueStakers() { - return __awaiter(this, void 0, void 0, function* () { - console.log("Fetching unique stakers..."); - const uniqueStakers = new Set(); - const stakedEventFilter = { - fromBlock: 70124014, - toBlock: "latest", - address: stakingContractAddress, - topics: [stakingContract.events.Staked.signature], - }; +(() => __awaiter(void 0, void 0, void 0, function* () { + let totalStakedBalances = {}; + let finalResults = []; + for (const item of data) { + const stakingContractAddress = item.stakingContractAddress; + const tokenContractAddress = item.tokenContractAddress; + const chainId = item.chainId; + const rpcUrl = yield getRpcUrl(chainId); try { - const logs = yield web3.eth.getPastLogs(stakedEventFilter); - logs.forEach((log) => { - const eventInterface = stakingContract.options.jsonInterface.find((i) => i.signature === log.topics[0]); - if (!eventInterface) { - console.error("Event interface not found for signature:", log.topics[0]); - return; - } - const inputs = eventInterface.inputs; - const event = web3.eth.abi.decodeLog(inputs, log.data, log.topics.slice(1)); - const stakerAddress = event["staker_"]; - uniqueStakers.add(stakerAddress); - }); - console.log("Unique stakers fetched."); - } - catch (error) { - console.error("Error fetching unique stakers:", error); - } - return Array.from(uniqueStakers); - }); -} -function getStakedBalances(stakers, decimals) { - return __awaiter(this, void 0, void 0, function* () { - console.log("Fetching staked balances..."); - const stakedBalances = new Map(); - for (const staker of stakers) { - try { - const balance = yield stakingContract.methods.stakeOf(staker).call(); - const convertedBalance = new bignumber_js_1.BigNumber(balance).dividedBy(new bignumber_js_1.BigNumber(10).pow(decimals)).toString(); - stakedBalances.set(staker, convertedBalance); + const web3Instance = getWeb3Instance(rpcUrl); + const decimals = yield getTokenDecimals(tokenContractAddress, web3Instance); + console.log("Token decimals:", decimals); + if (item.stakingPoolType === "standard") { + const stakers = yield (0, standardStaking_1.getUniqueStakers)(stakingContractAddress, web3Instance); + console.log("Unique staker addresses:", stakers); + const stakedBalances = yield (0, standardStaking_1.getStakedBalances)(stakers, decimals, stakingContractAddress, web3Instance); + console.log("Staked balances:", stakedBalances); + const stakingPoolName = item.stakingPoolName; + console.log("Staking pool name:", stakingPoolName); + const result = { + stakingPoolName: stakingPoolName, + stakedBalances: Object.fromEntries(stakedBalances), + }; + console.log("Result:", JSON.stringify(result, null, 2)); + // Update the totalStakedBalances object + stakedBalances.forEach((value, key) => { + if (totalStakedBalances[key]) { + const existingBalance = new bignumber_js_1.BigNumber(totalStakedBalances[key]); + const newBalance = existingBalance.plus(value); + totalStakedBalances[key] = newBalance.toString(); + } + else { + totalStakedBalances[key] = value; + } + }); + // Add the result to the finalResults array + finalResults.push(result); } - catch (error) { - console.error(`Error fetching staked balance for ${staker}:`, error); + else if (item.stakingPoolType === "open") { + const uniqueStakers = yield (0, openStaking_1.getUniqueStakersFromOpenStaking)(web3Instance, stakingContractAddress, tokenContractAddress); + console.log("Unique staker addresses from open staking:", uniqueStakers); + const stakedBalances = yield (0, openStaking_1.getOpenStakingStakedBalances)(web3Instance, stakingContractAddress, tokenContractAddress, uniqueStakers, decimals); + console.log("Staked balances from open staking:", stakedBalances); + // Rest of the logic to store and display results for open staking } - } - console.log("Staked balances fetched."); - return stakedBalances; - }); -} -function getStakingPoolName() { - return __awaiter(this, void 0, void 0, function* () { - console.log("Fetching staking pool name..."); - let poolName = ""; - try { - poolName = yield stakingContract.methods.name().call(); + // Add logic for other staking pool types here if needed } catch (error) { - console.error("Error fetching staking pool name:", error); + console.error("Error processing data item:", error); + continue; } - console.log("Staking pool name fetched."); - return poolName; - }); -} -(() => __awaiter(void 0, void 0, void 0, function* () { - const decimals = yield getTokenDecimals(tokenContractAddress); - console.log("Token decimals:", decimals); - const stakers = yield getUniqueStakers(); - console.log("Unique staker addresses:", stakers); - const stakedBalances = yield getStakedBalances(stakers, decimals); - console.log("Staked balances:", stakedBalances); - const stakingPoolName = yield getStakingPoolName(); - console.log("Staking pool name:", stakingPoolName); - const result = { - stakingPoolName: stakingPoolName, - stakedBalances: Object.fromEntries(stakedBalances), - }; - console.log("Result:", JSON.stringify(result, null, 2)); + } + // Add the total staked balances to the finalResults array + finalResults.push({ stakingPoolName: "totalStakedBalances", stakedBalances: totalStakedBalances }); + console.log("Final Results:", JSON.stringify(finalResults, null, 2)); }))(); diff --git a/build/src/openStaking.js b/build/src/openStaking.js new file mode 100644 index 0000000..e4081f8 --- /dev/null +++ b/build/src/openStaking.js @@ -0,0 +1,76 @@ +"use strict"; +// src/openStaking.ts +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getOpenStakingStakedBalances = exports.getUniqueStakersFromOpenStaking = void 0; +const bignumber_js_1 = require("bignumber.js"); +const tokenContractAbi_json_1 = __importDefault(require("../ABI/tokenContractAbi.json")); +const openStakingContractAbi_json_1 = __importDefault(require("../ABI/openStakingContractAbi.json")); +function getUniqueStakersFromOpenStaking(web3Instance, stakingContractAddress, tokenContractAddress) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Fetching Unique Stakers from Open Staking Contract..."); + const tokenContract = new web3Instance.eth.Contract(tokenContractAbi_json_1.default, tokenContractAddress); + const transferEventSignature = tokenContract.events.Transfer.signature; + const transferEventFilter = { + fromBlock: 66553295, + toBlock: "latest", + address: tokenContractAddress, + topics: [transferEventSignature, null, web3Instance.eth.abi.encodeParameter("address", stakingContractAddress)], + }; + const uniqueStakers = new Set(); + try { + const logs = yield web3Instance.eth.getPastLogs(transferEventFilter); + console.log("Fetched logs:", logs); + logs.forEach((log) => { + console.log("Log:", log); + const eventInterface = tokenContract.options.jsonInterface.find((i) => i.signature === log.topics[0]); + if (!eventInterface) { + console.error("Event interface not found for signature:", log.topics[0]); + return; + } + const inputs = eventInterface.inputs; + const event = web3Instance.eth.abi.decodeLog(inputs, log.data, log.topics.slice(1)); + console.log("Decoded event:", event); + // Check if the destination address matches the staking contract address + if (event.dst.toLowerCase() === stakingContractAddress.toLowerCase()) { + uniqueStakers.add(event.src); + } + }); + } + catch (error) { + console.error("Error fetching ERC20 transfers to Staking Contract:", error); + } + return uniqueStakers; + }); +} +exports.getUniqueStakersFromOpenStaking = getUniqueStakersFromOpenStaking; +function getOpenStakingStakedBalances(web3Instance, stakingContractAddress, tokenContractAddress, uniqueStakers, decimals) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Fetching staked balances from Open Staking Contract..."); + const stakingContract = new web3Instance.eth.Contract(openStakingContractAbi_json_1.default, stakingContractAddress); + const stakedBalances = {}; + try { + for (const stakerAddress of uniqueStakers) { + const stakedBalanceRaw = yield stakingContract.methods.stakeOf(tokenContractAddress, stakerAddress).call(); + const stakedBalance = new bignumber_js_1.BigNumber(stakedBalanceRaw).dividedBy(new bignumber_js_1.BigNumber(10).pow(decimals)).toString(); + stakedBalances[stakerAddress] = stakedBalance; + } + } + catch (error) { + console.error("Error fetching staked balances from Open Staking Contract:", error); + } + return stakedBalances; + }); +} +exports.getOpenStakingStakedBalances = getOpenStakingStakedBalances; diff --git a/build/src/standardStaking.js b/build/src/standardStaking.js new file mode 100644 index 0000000..91fb883 --- /dev/null +++ b/build/src/standardStaking.js @@ -0,0 +1,75 @@ +"use strict"; +// src/standardStaking.ts +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getStakedBalances = exports.getUniqueStakers = void 0; +const standardStakingContractAbi_json_1 = __importDefault(require("../ABI/standardStakingContractAbi.json")); +const bignumber_js_1 = require("bignumber.js"); +function getUniqueStakers(stakingContractAddress, web3Instance) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Fetching unique stakers..."); + const uniqueStakers = new Set(); + const stakingContract = new web3Instance.eth.Contract(standardStakingContractAbi_json_1.default, stakingContractAddress); + const stakedEventFilter = { + fromBlock: 66553295, + toBlock: "latest", + address: stakingContractAddress, + topics: [stakingContract.events.Staked.signature], + }; + try { + const logs = yield web3Instance.eth.getPastLogs(stakedEventFilter); + console.log("Fetched logs:", logs); + logs.forEach((log) => { + const eventInterface = stakingContract.options.jsonInterface.find((i) => i.signature === log.topics[0]); + if (!eventInterface) { + console.error("Event interface not found for signature:", log.topics[0]); + return; + } + const inputs = eventInterface.inputs; + const event = web3Instance.eth.abi.decodeLog(inputs, log.data, log.topics.slice(1)); + console.log("Decoded event:", event); + const stakerAddress = event["staker_"]; + uniqueStakers.add(stakerAddress); + }); + console.log("Unique stakers fetched."); + } + catch (error) { + console.error("Error fetching unique stakers:", error); + } + return Array.from(uniqueStakers); + }); +} +exports.getUniqueStakers = getUniqueStakers; +function getStakedBalances(stakers, decimals, stakingContractAddress, web3Instance) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Fetching staked balances..."); + const stakedBalances = new Map(); + const stakingContract = new web3Instance.eth.Contract(standardStakingContractAbi_json_1.default, stakingContractAddress); + for (const staker of stakers) { + try { + const balance = yield stakingContract.methods.stakeOf(staker).call(); + const convertedBalance = new bignumber_js_1.BigNumber(balance) + .dividedBy(new bignumber_js_1.BigNumber(10).pow(decimals)) + .toString(); + stakedBalances.set(staker, convertedBalance); + } + catch (error) { + console.error(`Error fetching staked balance for ${staker}:`, error); + } + } + console.log("Staked balances fetched."); + return stakedBalances; + }); +} +exports.getStakedBalances = getStakedBalances; diff --git a/package-lock.json b/package-lock.json index b8abd35..a021fce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,9 +13,13 @@ "@types/node": "^18.15.11", "dotenv": "^16.0.3", "ethers": "^6.3.0", - "ts-node": "^10.9.1", + "mongodb": "^5.3.0", "typescript": "^5.0.4", "web3": "^1.9.0" + }, + "devDependencies": { + "nodemon": "^2.0.22", + "ts-node": "^10.9.1" } }, "node_modules/@adraffy/ens-normalize": { @@ -27,6 +31,7 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -440,6 +445,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, "engines": { "node": ">=6.0.0" } @@ -447,12 +453,14 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -510,22 +518,26 @@ "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true }, "node_modules/@tsconfig/node16": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true }, "node_modules/@types/bn.js": { "version": "5.1.1", @@ -588,6 +600,26 @@ "@types/node": "*" } }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog==" + }, + "node_modules/@types/whatwg-url": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", + "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "dependencies": { + "@types/node": "*", + "@types/webidl-conversions": "*" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "node_modules/abortcontroller-polyfill": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", @@ -609,6 +641,7 @@ "version": "8.8.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -620,6 +653,7 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, "engines": { "node": ">=0.4.0" } @@ -644,10 +678,24 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true }, "node_modules/array-flatten": { "version": "1.1.1", @@ -704,6 +752,12 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "node_modules/base-x": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", @@ -747,6 +801,15 @@ "node": "*" } }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/blakejs": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", @@ -785,6 +848,28 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", @@ -821,6 +906,14 @@ "safe-buffer": "^5.1.2" } }, + "node_modules/bson": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.2.0.tgz", + "integrity": "sha512-HevkSpDbpUfsrHWmWiAsNavANKYIErV2ePXllp1bwq5CDreAaFVj6RVlZpJnxK4WWDCJ/5jMUpaY6G526q3Hjg==", + "engines": { + "node": ">=14.20.1" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -938,6 +1031,33 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -1006,6 +1126,12 @@ "node": ">= 0.8" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1104,7 +1230,8 @@ "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true }, "node_modules/cross-fetch": { "version": "3.1.5", @@ -1212,6 +1339,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, "engines": { "node": ">=0.3.1" } @@ -1588,6 +1716,18 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -1673,6 +1813,20 @@ "minipass": "^2.6.0" } }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -1710,6 +1864,18 @@ "assert-plus": "^1.0.0" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/global": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", @@ -1793,6 +1959,15 @@ "node": ">= 0.4.0" } }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -1950,11 +2125,22 @@ } ] }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -1978,6 +2164,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -1989,6 +2187,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-function": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", @@ -2008,6 +2215,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-hex-prefixed": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", @@ -2017,6 +2236,15 @@ "npm": ">=3" } }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/is-typed-array": { "version": "1.1.10", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", @@ -2133,7 +2361,8 @@ "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true }, "node_modules/md5.js": { "version": "1.3.5", @@ -2153,6 +2382,12 @@ "node": ">= 0.6" } }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -2222,6 +2457,18 @@ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", @@ -2278,6 +2525,78 @@ "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==" }, + "node_modules/mongodb": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.3.0.tgz", + "integrity": "sha512-Wy/sbahguL8c3TXQWXmuBabiLD+iVmz+tOgQf+FwkCjhUIorqbAxRbbz00g4ZoN4sXIPwpAlTANMaGRjGGTikQ==", + "dependencies": { + "bson": "^5.2.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + }, + "engines": { + "node": ">=14.20.1" + }, + "optionalDependencies": { + "saslprep": "^1.0.3" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.201.0", + "mongodb-client-encryption": ">=2.3.0 <3", + "snappy": "^7.2.2" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + } + } + }, + "node_modules/mongodb-connection-string-url": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", + "dependencies": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^11.0.0" + } + }, + "node_modules/mongodb-connection-string-url/node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/mongodb-connection-string-url/node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -2374,6 +2693,73 @@ "node-gyp-build-test": "build-test.js" } }, + "node_modules/nodemon": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nodemon/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/normalize-url": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", @@ -2500,6 +2886,18 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -2525,6 +2923,12 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -2623,6 +3027,18 @@ "node": ">= 6" } }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -2735,6 +3151,18 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "node_modules/saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "dependencies": { + "sparse-bitfield": "^3.0.3" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", @@ -2754,6 +3182,15 @@ "node": ">=10.0.0" } }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/send": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", @@ -2886,6 +3323,58 @@ "node": ">=4" } }, + "node_modules/simple-update-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", + "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", + "dev": true, + "dependencies": { + "semver": "~7.0.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "optional": true, + "dependencies": { + "memory-pager": "^1.0.2" + } + }, "node_modules/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -2946,6 +3435,18 @@ "npm": ">=3" } }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/swarm-js": { "version": "0.1.42", "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.42.tgz", @@ -3071,6 +3572,18 @@ "node": ">=0.10.0" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -3079,6 +3592,18 @@ "node": ">=0.6" } }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, "node_modules/tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -3100,6 +3625,7 @@ "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -3201,6 +3727,12 @@ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -3284,7 +3816,8 @@ "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true }, "node_modules/varint": { "version": "5.0.2", @@ -3803,6 +4336,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, "engines": { "node": ">=6" } @@ -3818,6 +4352,7 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, "requires": { "@jridgewell/trace-mapping": "0.3.9" } @@ -4051,17 +4586,20 @@ "@jridgewell/resolve-uri": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==" + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true }, "@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true }, "@jridgewell/trace-mapping": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -4098,22 +4636,26 @@ "@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true }, "@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true }, "@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true }, "@tsconfig/node16": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true }, "@types/bn.js": { "version": "5.1.1", @@ -4176,6 +4718,26 @@ "@types/node": "*" } }, + "@types/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog==" + }, + "@types/whatwg-url": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", + "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "requires": { + "@types/node": "*", + "@types/webidl-conversions": "*" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "abortcontroller-polyfill": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", @@ -4193,12 +4755,14 @@ "acorn": { "version": "8.8.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==" + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true }, "acorn-walk": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true }, "aes-js": { "version": "4.0.0-beta.3", @@ -4216,10 +4780,21 @@ "uri-js": "^4.2.2" } }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, "arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true }, "array-flatten": { "version": "1.1.1", @@ -4264,6 +4839,12 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "base-x": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", @@ -4290,6 +4871,12 @@ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==" }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, "blakejs": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", @@ -4324,6 +4911,25 @@ "unpipe": "1.0.0" } }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", @@ -4360,6 +4966,11 @@ "safe-buffer": "^5.1.2" } }, + "bson": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.2.0.tgz", + "integrity": "sha512-HevkSpDbpUfsrHWmWiAsNavANKYIErV2ePXllp1bwq5CDreAaFVj6RVlZpJnxK4WWDCJ/5jMUpaY6G526q3Hjg==" + }, "buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -4440,6 +5051,22 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -4498,6 +5125,12 @@ "delayed-stream": "~1.0.0" } }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -4578,7 +5211,8 @@ "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true }, "cross-fetch": { "version": "3.1.5", @@ -4656,7 +5290,8 @@ "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true }, "dom-walk": { "version": "0.1.2", @@ -4996,6 +5631,15 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, "finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -5066,6 +5710,13 @@ "minipass": "^2.6.0" } }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -5094,6 +5745,15 @@ "assert-plus": "^1.0.0" } }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "global": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", @@ -5158,6 +5818,12 @@ "function-bind": "^1.1.1" } }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -5269,11 +5935,22 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -5288,11 +5965,26 @@ "has-tostringtag": "^1.0.0" } }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, "is-function": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", @@ -5306,11 +5998,26 @@ "has-tostringtag": "^1.0.0" } }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "is-hex-prefixed": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==" }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, "is-typed-array": { "version": "1.1.10", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", @@ -5408,7 +6115,8 @@ "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true }, "md5.js": { "version": "1.3.5", @@ -5425,6 +6133,12 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -5476,6 +6190,15 @@ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", @@ -5516,6 +6239,50 @@ "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==" }, + "mongodb": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.3.0.tgz", + "integrity": "sha512-Wy/sbahguL8c3TXQWXmuBabiLD+iVmz+tOgQf+FwkCjhUIorqbAxRbbz00g4ZoN4sXIPwpAlTANMaGRjGGTikQ==", + "requires": { + "bson": "^5.2.0", + "mongodb-connection-string-url": "^2.6.0", + "saslprep": "^1.0.3", + "socks": "^2.7.1" + } + }, + "mongodb-connection-string-url": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", + "requires": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^11.0.0" + }, + "dependencies": { + "tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "requires": { + "punycode": "^2.1.1" + } + }, + "webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" + }, + "whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "requires": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + } + } + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -5592,6 +6359,56 @@ "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==" }, + "nodemon": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", + "dev": true, + "requires": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, "normalize-url": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", @@ -5689,6 +6506,12 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -5708,6 +6531,12 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, + "pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -5779,6 +6608,15 @@ "util-deprecate": "^1.0.1" } }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -5867,6 +6705,15 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, "scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", @@ -5882,6 +6729,12 @@ "node-gyp-build": "^4.2.0" } }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, "send": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", @@ -5986,6 +6839,46 @@ } } }, + "simple-update-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", + "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", + "dev": true, + "requires": { + "semver": "~7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" + }, + "socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "requires": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + } + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -6028,6 +6921,15 @@ "is-hex-prefixed": "1.0.0" } }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, "swarm-js": { "version": "0.1.42", "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.42.tgz", @@ -6127,11 +7029,29 @@ "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==" }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, "toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" }, + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "requires": { + "nopt": "~1.0.10" + } + }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -6150,6 +7070,7 @@ "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -6216,6 +7137,12 @@ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" }, + "undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -6282,7 +7209,8 @@ "v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true }, "varint": { "version": "5.0.2", @@ -6708,7 +7636,8 @@ "yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true } } } diff --git a/package.json b/package.json index c728f1c..e39ec95 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,10 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node build/src/index.js", + "build": "tsc", + "dev": "nodemon --exec ts-node -- src/index.ts" }, "repository": { "type": "git", @@ -21,8 +24,12 @@ "@types/node": "^18.15.11", "dotenv": "^16.0.3", "ethers": "^6.3.0", - "ts-node": "^10.9.1", + "mongodb": "^5.3.0", "typescript": "^5.0.4", "web3": "^1.9.0" + }, + "devDependencies": { + "nodemon": "^2.0.22", + "ts-node": "^10.9.1" } -} +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 3d40539..6f48cbb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,148 +1,137 @@ // src/index.ts import dotenv from "dotenv"; -import Web3 from "web3"; -import { AbiItem, AbiInput } from "web3-utils"; -import { BigNumber } from "bignumber.js"; -import stakingContractAbi from "../ABI/standardStakingContractAbi.json"; -import tokenContractAbi from "../ABI/tokenContractAbi.json"; +import web3 from "web3"; +import { getUniqueStakers, getStakedBalances } from "./standardStaking"; +import { getUniqueStakersFromOpenStaking, getOpenStakingStakedBalances } from "./openStaking"; +import { StakingContractDataItem } from "./types"; +import { getRpcUrl } from "./utils/getRpcUrl"; +import { getTokenDecimals } from "./utils/getTokenDecimals"; +import { updateTotalStakedBalances } from "./utils/updateTotalStakedBalances"; dotenv.config(); +const APP_NAME = process.env.APP_NAME; +const DB_CONNECTION_STRING = process.env.DB_CONNECTION_STRING ?? ""; +const DB_NAME = process.env.DB_NAME ?? ""; +const DB_COLLECTION = process.env.DB_COLLECTION ?? ""; -const rpcUrl = process.env.RPC_URL || ""; -const web3 = new Web3(rpcUrl); - -console.log("Web3 instance created."); - -const tokenContractAddress = "0x9f6abbf0ba6b5bfa27f4deb6597cc6ec20573fda"; -const tokenContract = new web3.eth.Contract( - tokenContractAbi as unknown as AbiItem[], - tokenContractAddress -); - -console.log("Token contract instance created."); +if (!DB_CONNECTION_STRING || !DB_NAME || !DB_COLLECTION) { + throw new Error("DB_CONNECTION_STRING, DB_NAME, or DB_COLLECTION is not defined."); +} -async function getTokenDecimals(tokenContractAddress: string): Promise { - console.log("Fetching token decimals..."); +const getWeb3Instance = (rpcUrl: string | undefined): web3 => { + if (!rpcUrl) { + throw new Error("RPC URL is undefined."); + } + return new web3(rpcUrl); +}; + +// The data array containing staking contract and token contract addresses +const data: StakingContractDataItem[] = [ + { + stakingPoolName: "GC - VIP Pool - FRM Arbitrum", + stakingContractAddress: "0x2bE7904c81dd3535f31B2C7B524a6ed91FDb37EC", + stakingPoolType: "standard", + tokenContractAddress: "0x9f6abbf0ba6b5bfa27f4deb6597cc6ec20573fda", + chainId: "42161", + fromBlock: 66553295, + toBlock: "latest" + }, + { + stakingPoolName: "cFRM Arbitrum Open Staking", + stakingContractAddress: "0xb4927895cbee88e651e0582893051b3b0f8d7db8", + stakingPoolType: "open", + tokenContractAddress: "0xe685d3cc0be48bd59082ede30c3b64cbfc0326e2", + chainId: "42161", + fromBlock: 66553295, + toBlock: "latest" + }, + { + stakingPoolName: "cFRM BSC Open Staking", + stakingContractAddress: "0x35e15ff9ebb37d8c7a413fd85bad515396dc8008", + stakingPoolType: "open", + tokenContractAddress: "0xaf329a957653675613d0d98f49fc93326aeb36fc", + chainId: "56", + fromBlock: 17533067, + toBlock: 18033067 + } +]; - let decimals = 18; - try { - const tokenContract = new web3.eth.Contract(tokenContractAbi as unknown as AbiItem[], tokenContractAddress); - decimals = parseInt(await tokenContract.methods.decimals().call()); - } catch (error) { - console.error("Error fetching token decimals:", error); - } +(async () => { + let totalStakedBalances: { [address: string]: string } = {}; + let finalResults: any[] = []; + + for (const item of data) { + const stakingPoolName = item.stakingPoolName; + const stakingContractAddress = item.stakingContractAddress; + const tokenContractAddress = item.tokenContractAddress; + const chainId = item.chainId; + const fromBlock = item.fromBlock; + const toBlock = item.toBlock; + const rpcUrl = await getRpcUrl(chainId, APP_NAME, DB_CONNECTION_STRING, DB_NAME, DB_COLLECTION); - console.log("Token decimals fetched."); - return decimals; -} + try { + const web3Instance = getWeb3Instance(rpcUrl); + const decimals = await getTokenDecimals(tokenContractAddress, web3Instance); + console.log("Token decimals:", decimals); + + if (item.stakingPoolType === "standard") { + const stakers = await getUniqueStakers(stakingContractAddress, web3Instance, fromBlock, toBlock); + console.log("Unique staker addresses:", stakers); + + const stakedBalances = await getStakedBalances( + stakers, + decimals, + stakingContractAddress, + web3Instance + ); + console.log("Staked balances:", stakedBalances); + const result = { + stakingPoolName: stakingPoolName, + stakedBalances: stakedBalances, + }; -const stakingContractAddress = "0x2bE7904c81dd3535f31B2C7B524a6ed91FDb37EC"; -const stakingContract = new web3.eth.Contract( - stakingContractAbi as unknown as AbiItem[], - stakingContractAddress -); + console.log("Result:", JSON.stringify(result, null, 2)); -console.log("Staking contract instance created."); + // Update the totalStakedBalances object + updateTotalStakedBalances(stakedBalances, totalStakedBalances); -async function getUniqueStakers(): Promise { - console.log("Fetching unique stakers..."); + // Add the result to the finalResults array + finalResults.push(result); + } else if (item.stakingPoolType === "open") { + const uniqueStakers = await getUniqueStakersFromOpenStaking(web3Instance, stakingContractAddress, tokenContractAddress, fromBlock, toBlock); + console.log("Unique staker addresses from open staking:", uniqueStakers); - const uniqueStakers = new Set(); + const stakedBalances = await getOpenStakingStakedBalances(web3Instance, stakingContractAddress, tokenContractAddress, uniqueStakers, decimals); + console.log("Staked balances from open staking:", stakedBalances); - const stakedEventFilter = { - fromBlock: 70124014, - toBlock: "latest", - address: stakingContractAddress, - topics: [stakingContract.events.Staked.signature], - }; + const result = { + stakingPoolName: stakingPoolName, + stakedBalances: stakedBalances, + }; - try { - const logs = await web3.eth.getPastLogs(stakedEventFilter); + console.log("Result:", JSON.stringify(result, null, 2)); - logs.forEach((log) => { - const eventInterface = stakingContract.options.jsonInterface.find( - (i: any) => i.signature === log.topics[0] - ); - - if (!eventInterface) { - console.error("Event interface not found for signature:", log.topics[0]); - return; - } - - const inputs = eventInterface.inputs as AbiInput[]; - - const event = web3.eth.abi.decodeLog( - inputs, - log.data, - log.topics.slice(1) - ); - const stakerAddress = event["staker_"]; - uniqueStakers.add(stakerAddress); - }); - - console.log("Unique stakers fetched."); - } catch (error) { - console.error("Error fetching unique stakers:", error); - } + // Update the totalStakedBalances object + updateTotalStakedBalances(stakedBalances, totalStakedBalances); - return Array.from(uniqueStakers); -} + // Add the result to the finalResults array + finalResults.push(result); + } -async function getStakedBalances(stakers: string[], decimals: number): Promise> { - console.log("Fetching staked balances..."); - const stakedBalances = new Map(); + // Add logic for other staking pool types here if needed - for (const staker of stakers) { - try { - const balance = await stakingContract.methods.stakeOf(staker).call(); - const convertedBalance = new BigNumber(balance).dividedBy(new BigNumber(10).pow(decimals)).toString(); - stakedBalances.set(staker, convertedBalance); } catch (error) { - console.error(`Error fetching staked balance for ${staker}:`, error); + console.error("Error processing data item:", error); + continue; } } - console.log("Staked balances fetched."); - return stakedBalances; -} - - -async function getStakingPoolName(): Promise { - console.log("Fetching staking pool name..."); - - let poolName = ""; - - try { - poolName = await stakingContract.methods.name().call(); - } catch (error) { - console.error("Error fetching staking pool name:", error); - } - - console.log("Staking pool name fetched."); - return poolName; -} - -(async () => { - const decimals = await getTokenDecimals(tokenContractAddress); - console.log("Token decimals:", decimals); - - const stakers = await getUniqueStakers(); - console.log("Unique staker addresses:", stakers); - - const stakedBalances = await getStakedBalances(stakers, decimals); - console.log("Staked balances:", stakedBalances); - - const stakingPoolName = await getStakingPoolName(); - console.log("Staking pool name:", stakingPoolName); - - const result = { - stakingPoolName: stakingPoolName, - stakedBalances: Object.fromEntries(stakedBalances), - }; + // Add the total staked balances to the finalResults array + finalResults.push({ stakingPoolName: "totalStakedBalances", stakedBalances: totalStakedBalances }); - console.log("Result:", JSON.stringify(result, null, 2)); + console.log("Final Results:", JSON.stringify(finalResults, null, 2)); })(); \ No newline at end of file diff --git a/src/openStaking.ts b/src/openStaking.ts new file mode 100644 index 0000000..56d151e --- /dev/null +++ b/src/openStaking.ts @@ -0,0 +1,92 @@ +// src/openStaking.ts + +import fs from "fs"; +import web3 from "web3"; +import { BigNumber } from "bignumber.js"; +import { AbiItem, AbiInput } from "web3-utils"; +import tokenContractAbi from "../ABI/tokenContractAbi.json"; +import openStakingContractAbi from "../ABI/openStakingContractAbi.json"; + +export async function getUniqueStakersFromOpenStaking( + web3Instance: web3, + stakingContractAddress: string, + tokenContractAddress: string, + fromBlock: number | "latest", + toBlock: number | "latest" +): Promise> { + console.log("Fetching Unique Stakers from Open Staking Contract..."); + + const tokenContract = new web3Instance.eth.Contract(tokenContractAbi as unknown as AbiItem[], tokenContractAddress); + const transferEventSignature = tokenContract.events.Transfer.signature; + + const transferEventFilter = { + fromBlock: fromBlock, + toBlock: toBlock, + address: tokenContractAddress, + topics: [transferEventSignature, null, web3Instance.eth.abi.encodeParameter("address", stakingContractAddress)], + }; + + const uniqueStakers = new Set(); + + try { + const logs = await web3Instance.eth.getPastLogs(transferEventFilter); + console.log("Fetched logs:", logs); + + logs.forEach((log) => { + console.log("Log:", log); + + const eventInterface = tokenContract.options.jsonInterface.find( + (i: any) => i.signature === log.topics[0] + ); + + if (!eventInterface) { + console.error("Event interface not found for signature:", log.topics[0]); + return; + } + + const inputs = eventInterface.inputs as AbiInput[]; + + const event = web3Instance.eth.abi.decodeLog( + inputs, + log.data, + log.topics.slice(1) + ); + console.log("Decoded event:", event); + + // Check if the destination address matches the staking contract address + if (event.dst.toLowerCase() === stakingContractAddress.toLowerCase()) { + uniqueStakers.add(event.src); + } + }); + } catch (error) { + console.error("Error fetching ERC20 transfers to Staking Contract:", error); + } + + return uniqueStakers; +} + +export async function getOpenStakingStakedBalances( + web3Instance: web3, + stakingContractAddress: string, + tokenContractAddress: string, + uniqueStakers: Set, + decimals: number + ): Promise<{ [stakerAddress: string]: string }> { + console.log("Fetching staked balances from Open Staking Contract..."); + + const stakingContract = new web3Instance.eth.Contract(openStakingContractAbi as unknown as AbiItem[], stakingContractAddress); + const stakedBalances: { [stakerAddress: string]: string } = {}; + + try { + for (const stakerAddress of uniqueStakers) { + const stakedBalanceRaw = await stakingContract.methods.stakeOf(tokenContractAddress, stakerAddress).call(); + const stakedBalance = new BigNumber(stakedBalanceRaw).dividedBy(new BigNumber(10).pow(decimals)).toString(); + stakedBalances[stakerAddress] = stakedBalance; + } + } catch (error) { + console.error("Error fetching staked balances from Open Staking Contract:", error); + } + + return stakedBalances; + } + \ No newline at end of file diff --git a/src/standardStaking.ts b/src/standardStaking.ts new file mode 100644 index 0000000..3fed387 --- /dev/null +++ b/src/standardStaking.ts @@ -0,0 +1,93 @@ +// src/standardStaking.ts + +import { AbiItem, AbiInput } from "web3-utils"; +import web3 from "web3"; +import standardStakingContractAbi from "../ABI/standardStakingContractAbi.json"; +import { BigNumber } from "bignumber.js"; + +export async function getUniqueStakers( + stakingContractAddress: string, + web3Instance: web3, + fromBlock: number | "latest", + toBlock: number | "latest" +): Promise { + console.log("Fetching unique stakers..."); + + const uniqueStakers = new Set(); + + const stakingContract = new web3Instance.eth.Contract( + standardStakingContractAbi as unknown as AbiItem[], + stakingContractAddress + ); + + const stakedEventFilter = { + fromBlock: fromBlock, + toBlock: toBlock, + address: stakingContractAddress, + topics: [stakingContract.events.Staked.signature], + }; + + try { + const logs = await web3Instance.eth.getPastLogs(stakedEventFilter); + console.log("Fetched logs:", logs); + + logs.forEach((log) => { + const eventInterface = stakingContract.options.jsonInterface.find( + (i: any) => i.signature === log.topics[0] + ); + + if (!eventInterface) { + console.error("Event interface not found for signature:", log.topics[0]); + return; + } + + const inputs = eventInterface.inputs as AbiInput[]; + + const event = web3Instance.eth.abi.decodeLog( + inputs, + log.data, + log.topics.slice(1) + ); + console.log("Decoded event:", event); + const stakerAddress = event["staker_"]; + uniqueStakers.add(stakerAddress); + }); + + console.log("Unique stakers fetched."); + } catch (error) { + console.error("Error fetching unique stakers:", error); + } + + return Array.from(uniqueStakers); +} + +export async function getStakedBalances( + stakers: string[], + decimals: number, + stakingContractAddress: string, + web3Instance: web3 + ): Promise<{ [stakerAddress: string]: string }> { + console.log("Fetching staked balances..."); + + const stakedBalances: { [stakerAddress: string]: string } = {}; + + const stakingContract = new web3Instance.eth.Contract( + standardStakingContractAbi as unknown as AbiItem[], + stakingContractAddress + ); + + for (const staker of stakers) { + try { + const balance = await stakingContract.methods.stakeOf(staker).call(); + const convertedBalance = new BigNumber(balance) + .dividedBy(new BigNumber(10).pow(decimals)) + .toString(); + stakedBalances[staker] = convertedBalance; + } catch (error) { + console.error(`Error fetching staked balance for ${staker}:`, error); + } + } + + console.log("Staked balances fetched."); + return stakedBalances; +} diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..c0951c5 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,12 @@ +// src/types.ts + +export type StakingContractDataItem = { + stakingPoolName: string; + stakingContractAddress: string; + stakingPoolType: string; + tokenContractAddress: string; + chainId: string; + fromBlock: number | "latest"; + toBlock: number | "latest"; + }; + \ No newline at end of file diff --git a/src/utils/getRpcUrl.ts b/src/utils/getRpcUrl.ts new file mode 100644 index 0000000..ad02489 --- /dev/null +++ b/src/utils/getRpcUrl.ts @@ -0,0 +1,31 @@ +// src/utils/getRpcUrl.ts + +import { MongoClient } from "mongodb"; + +export const getRpcUrl = async (chainId: string, appName: string = "snapshot", DB_CONNECTION_STRING: string, DB_NAME: string, DB_COLLECTION: string): Promise => { + + const client = new MongoClient(DB_CONNECTION_STRING); + + try { + await client.connect(); + const db = client.db(DB_NAME); + const collection = db.collection(DB_COLLECTION); + + const document = await collection.findOne({ appName }); + + if (document) { + const chainIdToNetworkMap = document.chainIdToNetworkMap; + const rpcDetails = chainIdToNetworkMap.find((item: any) => item.chainId === chainId); + + if (rpcDetails) { + return rpcDetails.jsonRpcUrl; + } + } + } catch (error) { + console.error("Error fetching RPC URL:", error); + } finally { + await client.close(); + } + + return undefined; + }; \ No newline at end of file diff --git a/src/utils/getTokenDecimals.ts b/src/utils/getTokenDecimals.ts new file mode 100644 index 0000000..4f0ef53 --- /dev/null +++ b/src/utils/getTokenDecimals.ts @@ -0,0 +1,21 @@ +// src/utils/getTokenDecimals.ts + +import web3 from "web3"; +import { AbiItem } from "web3-utils"; +import tokenContractAbi from "../../ABI/tokenContractAbi.json"; + +export async function getTokenDecimals(tokenContractAddress: string, web3: web3): Promise { + console.log("Fetching token decimals..."); + + let decimals = 18; + + try { + const tokenContract = new web3.eth.Contract(tokenContractAbi as unknown as AbiItem[], tokenContractAddress); + decimals = parseInt(await tokenContract.methods.decimals().call()); + } catch (error) { + console.error("Error fetching token decimals:", error); + } + + console.log("Token decimals fetched."); + return decimals; + } \ No newline at end of file diff --git a/src/utils/updateTotalStakedBalances.ts b/src/utils/updateTotalStakedBalances.ts new file mode 100644 index 0000000..c68d7c4 --- /dev/null +++ b/src/utils/updateTotalStakedBalances.ts @@ -0,0 +1,16 @@ +// src/utils/updateTotalStakedBalances.ts + +import { BigNumber } from "bignumber.js"; + +export function updateTotalStakedBalances(stakedBalances: { [address: string]: string }, totalStakedBalances: { [address: string]: string }): void { + for (const key in stakedBalances) { + const value = stakedBalances[key]; + if (totalStakedBalances[key]) { + const existingBalance = new BigNumber(totalStakedBalances[key]); + const newBalance = existingBalance.plus(value); + totalStakedBalances[key] = newBalance.toString(); + } else { + totalStakedBalances[key] = value; + } + } + } \ No newline at end of file diff --git a/uniqueStakers.json b/uniqueStakers.json new file mode 100644 index 0000000..2ecaa4c --- /dev/null +++ b/uniqueStakers.json @@ -0,0 +1,129 @@ +[ + "0x0Bdb79846e8331A19A65430363f240Ec8aCC2A52", + "0xfB7497e5A4E923982CaEdEC7341a77DbE74f77B2", + "0x697e8e42a50D9a759A238baab25919B177deFb89", + "0x7E8EaDb47Bc6537b97d5c9b92023673Db7b2ff5f", + "0x0a8A08C7Ce71b69BE1d5e03FD93bfddf22EFDD3E", + "0x09055D850Dc88258ebA0F69b1d2b4572f2358de8", + "0xd0E70678e3394C5D390F9f77DAd7ABde4Fd02577", + "0x468b83D6c8941115E9c61385aff8b71ADD5B8cE8", + "0x13c9eD9dd489de46E634c71d5ACe1F72B53952Dc", + "0x2ed211293b1Db5E7d177E2711beA83700E45B150", + "0xBA284f6737c625D8F70585CC73f75801b60D572A", + "0x6939f1aF0A0Fba6B6cbFC7C92d4D95FeFf609486", + "0x454a736Ad616E6897180E9795166C08e847b2779", + "0xcB53FFc78921C069dc104d0781237ee04736e82D", + "0x579b266108b97A52eD802922e81A3De1fCAb79b6", + "0x1152a020fB03804A651559c5b8136Ca69aDeC929", + "0xcAd8f8C53A6D2b740cd4BBd8398DCDc1FD4fCdC3", + "0xAEF999f5fB7D173330a6Ea693dA22c6A6052a26f", + "0xB1939298E22258121Cf54844A499911832Ea4E64", + "0x5d795aC9e2711B50bC657a2aeb9D72CaF53f2Cf8", + "0xd2Ff80A17fBF9D89C4573C690a8f1958E9a3c080", + "0x9f7De8fc85565b59189460A13cEd20215E9fBab2", + "0xcdD961B0099BbdCF50b490eEa4cF7D58a2a1Fd95", + "0x19A65785fAdB3579A637F0B177999B53cC8Fc592", + "0xAB6ed0F5BbAd67783997F28F68f7e6b4908689F5", + "0xecAE434B7F63b8C2f2993D24C05a41774407C800", + "0xC6F79062c774eB1a77172221a28D5a7F11eD10BB", + "0xa16cFB0e67a85D80fCd246d77623aa02482d2b10", + "0x133937476926A1A9b93e7AD71a4af2F60df31c0F", + "0x4c4180bF5eC78AF9025bDD935ed69E29c2F6CbAE", + "0x3F14F51496C89b97b2e251ba6ff79ac75BdC3b32", + "0x75dFb218a7F5818322Ce549d5Adb7E6825dd8fB9", + "0x6479f7157f06e6610174b1029388B8D4193c00A0", + "0x384582CE938903395c7070FA3F8a3a3a02217823", + "0xeF2d9a9f0Ec3432e6Ad2316239bd68F4Fc38dA72", + "0x2b1BBf7a8f80E0a51EDb6C4B127a67C22c010376", + "0xb6a34Bd460f02241e80e031023ec20ce6FC310AE", + "0x7da3Bf2A60727B861AeE226a9C044675078A3699", + "0xe654A93631f9f539753A0261Fa72D329F07d31F2", + "0xb58B3e8b334EBFdA6EB27f0c13974E058085F422", + "0x75ba24175EF3A4a265f091B92F61fF1486948218", + "0x8017831dbcffA500f65d53161409b1ED0Ab1b328", + "0xF7d2c9A3ef4F5A62a2Bc0a073Bc506Ff98d7B892", + "0xC20Ad3df87B0E19953085A8E37d2325eBb31E09b", + "0x33CBF3464813A5301dfb184cE7A2502ad3b9E86D", + "0xf401DA5850C1C4a13fe9243eCb48cEdeDfAbEEDE", + "0x281fB0df1E708EE20C03412C08Cc80e1F0dD46b4", + "0x6b8E9589ca597bcf0B55b973527DF5e0dC77c456", + "0x08f83C653BeD001aeE5ea3c8466DD4D3D2D4ae67", + "0x5785530B6f0EA72B0Dba474D55b43e1AF1182CAD", + "0x7D1128E918ee54f491455B4597f2Dd7C73d9192F", + "0xE2ff56d0D334fc1B68bCA1799572CD4419591CFb", + "0xB77d5C48465F29A837c8EeaAEd48CF6FD4cCb06e", + "0x59fbE8dC6849aB691E81350634b17C5dd57aE937", + "0xDe37199723dF9643ebBc270296C9CE047F13bC11", + "0x81a2A64792823Aba689B7b08A3c34276b830338d", + "0x8B402e79D49F453a0a7F6E34ADbcDF13889A6e5F", + "0xe3b773FFD14e8516aFbe609f8235Fa7b7a23d8a2", + "0xAf6cAaD869a7d6521Dc7A6099199758d09a758C6", + "0xA2163b6c212dB70066eAF921d066D7bEA26BB687", + "0x6a5919533B9E3D25663FFB33c79210ec293D450B", + "0x937f0B5d65541f994c5AE960fEbd3BcbbBE05FA4", + "0x81AbaB6C986CD57eef13dcBb3Cda195ffeEC012c", + "0xae77f2A6D9E52db6a9761F13200093868aE06255", + "0xBfFE3B8CF8F92F139BA689D7F92B07000e880A5a", + "0x2985559c2751BD80C0f5df3A3328AA9A6f4f7974", + "0x6bf971c1526BF83C72630d9eA98c8960d18612EE", + "0x8f3a8Ba9937cb343518e613F5691DCA0BE7289B8", + "0xAf66433A751D022EcD493B3CD59Af094766C077C", + "0x7016c3F2cc51C049bc1899A81ecC59FFBbFcEF8e", + "0xcD9B6178dde75A631931882bf823Cd879b739872", + "0x8Cb988B3B5444B5fB0Ee19113C465aad9360704c", + "0x020B0D4c844E0dBcA51C9AB779DF0191978c0359", + "0x71eD33cCEefA2EfCA47C64CCDE8840213c969c73", + "0x3e8ACfF977fb67220e06FAdDb8e04c2E1AEF2a31", + "0x18f23DE08E6e845d704d7cEF2c33c1bC6b9bBd22", + "0xDd4ebEbE197Ca16dC2042414e3b243AB265b0D9A", + "0x7106806B1d3B003fc222BC7437f5a3611985d8fC", + "0xC8D46eb7881975F9aE15216FeEBa2ff58E55803c", + "0x7d8E6F605Bdbe7a3535473be71d243CD2B7217d8", + "0x119b134E974e20Df79feA161B08970025e4D5325", + "0xd81E2Cb9394b399d6F08C69637aDFEA1e3634103", + "0x659e7Ab75c1445706E7BFc709d80f3519c6E98e6", + "0x3D6Fb600cf855d5a34E61d2a2eb8Ae520b457Dcd", + "0x10cE200385a0f214d357CA31f92dBEE247a56ba8", + "0x3976e8B07016375488EBCE2563FdA4A7d51347bC", + "0x04d06de9217c6799EC56CEa0b10b8838a0838Cbc", + "0xF439806E0CD051C9c68Cf3F8738eaa0f02900E88", + "0x9822e2fb3f11050c2Be18585372f338e3d52fAca", + "0x34a756A1E9F9A1C260AadAc6fCD8b1175FD70246", + "0xd187aC83334467F59f0E68Ba4629f6c23e325cf4", + "0x695ACf894FC87fFe4b9b6670FAF2B24dc5B1E763", + "0xD79c56C065C50F323Eb1142Bb871f757F47A9D08", + "0xEA7c361C0e7C1893b9cc717f313942c87B5F388a", + "0xeF9bf435fA35DCcc0F09BcB4aE937557FCDb0EC0", + "0x5Cad4eEd8374f1F3962b915b71acd36f4927e1d1", + "0x3F62FCD00815D551A22690bD2cB7d081436Fc41d", + "0xA71B5BaF388788d83338204B93B0FF494360c0ba", + "0xE096c767aB4AD513DD6e639c54490724b12195Df", + "0x3f98569D903cD444eE6153e82b27bbe84301E489", + "0x78926DCC712df4DcBdfe6119E002A6470703fb5e", + "0xd298EaD640eB1D870AA14aEdf902d73759B0A475", + "0x35014F90cBE637121E6F713184B5F166cf146FbE", + "0x3db453423ABD89852871d13c917DbD1a1ad4284E", + "0x4f941E5Da657375e75d6d92852431CC7bE3EF7A8", + "0x57E625C06900812ce1DD8FA56FB6dc111eF053D8", + "0x2F57b13dF767C93c61Db1111c63B7987D5DC936C", + "0x462E3969C93b4EB5eF1d0987e509e16B795358Dd", + "0xeC181357EAe8Da50d965Ab378B9CE73ffc3464BA", + "0xF85e2156b759C269c329FD15081100f724e8821E", + "0xc2b75c2925Bc3FB62fd9F9C21D39c92C700C2F62", + "0x41e37f8705487b20F89b4AAbF9F03A9AF1699c85", + "0xc495d99e1dc063909e4a333d9400c2ac23e44a36", + "0x218Aa60078d6CB4Dbd073fabE853643cE07d2a42", + "0x8E1f5874e5CFF3Fa1300f1697b783c6D5cC2AD7b", + "0x5C446AB915efECC63067E7D8be39E4A5D298008f", + "0x9DDe807E7f0ef57d0747c5D0633B8306CfBA2C95", + "0x12f243B1Bb39094a61ef15ffdD499f441b4A11e9", + "0x94E6f42a2d44a1eD4A4CD459D0FcDC8b4eA5A5cB", + "0x9Ae63B21528f625F30D1f8723F0b7090C127D202", + "0xDfBd5f2b13b634E33795f56cACdC24A2af65c58e", + "0x8775f569850C5432c3Fe8d4c1881dB8068DB6A50", + "0xc977E7b16c33cF122302d5285247dA09a460Dda1", + "0x0cDEC255E96EE99aF86c1B1FB765Dd50032629D2", + "0xAbC85B044fBCF943BE8CFDd4cd49A706986DDDE4", + "0x0d60b347E261abA45dA50e8eED8BCB8cdb59D517", + "0x5f02C0C9bFc2257AFcB93a871DCd311a97EC28B4" +] \ No newline at end of file