From 00de3ee363a420e56e67fad05efcdff9258ac33e Mon Sep 17 00:00:00 2001 From: wsdt Date: Fri, 9 Aug 2024 19:10:48 +0200 Subject: [PATCH] fix: ABI --- contracts/script/deploy-stack.ts | 1 - frontend/docker-compose.yml | 2 +- frontend/public/abi/EP.json | 1008 ++++++++++++++++ frontend/public/abi/TokenPrice.json | 411 +++++++ frontend/src/abi/EP.json | 1011 ----------------- frontend/src/abi/TokenPrice.json | 1 - frontend/src/abi/your-contract.abi.json | 63 - frontend/src/components/TokenPriceFetcher.tsx | 392 +++---- frontend/src/hooks/useContractAbi.ts | 2 +- frontend/src/vite-env.d.ts | 1 - 10 files changed, 1617 insertions(+), 1275 deletions(-) create mode 100644 frontend/public/abi/EP.json create mode 100644 frontend/public/abi/TokenPrice.json delete mode 100644 frontend/src/abi/EP.json delete mode 100644 frontend/src/abi/TokenPrice.json delete mode 100644 frontend/src/abi/your-contract.abi.json diff --git a/contracts/script/deploy-stack.ts b/contracts/script/deploy-stack.ts index 6c07cfb..acce572 100644 --- a/contracts/script/deploy-stack.ts +++ b/contracts/script/deploy-stack.ts @@ -114,7 +114,6 @@ async function main() { // save relevant envs to frontend console.log('Saving relevant env variables to frontend. The Boba sepolia config will be used if some variables are missing.') updateEnvVariable("VITE_ENTRY_POINT", process.env.ENTRYPOINT ?? '0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789', '../../frontend/.env'); - updateEnvVariable("VITE_PRIVATE_KEY", PRIVATE_KEY!, '../../frontend/.env'); updateEnvVariable("VITE_SMART_CONTRACT", tokenPriceAddress, '../../frontend/.env'); updateEnvVariable("VITE_RPC_PROVIDER", RPC_URL ?? 'https://sepolia.boba.network', '../../frontend/.env'); diff --git a/frontend/docker-compose.yml b/frontend/docker-compose.yml index 82284cf..fb1129c 100644 --- a/frontend/docker-compose.yml +++ b/frontend/docker-compose.yml @@ -8,6 +8,6 @@ services: env_file: - .env ports: - - "8080:80" + - "8000:80" restart: unless-stopped diff --git a/frontend/public/abi/EP.json b/frontend/public/abi/EP.json new file mode 100644 index 0000000..9688737 --- /dev/null +++ b/frontend/public/abi/EP.json @@ -0,0 +1,1008 @@ +[ + { + "inputs": [ + { "internalType": "uint256", "name": "preOpGas", "type": "uint256" }, + { "internalType": "uint256", "name": "paid", "type": "uint256" }, + { "internalType": "uint48", "name": "validAfter", "type": "uint48" }, + { "internalType": "uint48", "name": "validUntil", "type": "uint48" }, + { "internalType": "bool", "name": "targetSuccess", "type": "bool" }, + { "internalType": "bytes", "name": "targetResult", "type": "bytes" } + ], + "name": "ExecutionResult", + "type": "error" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "opIndex", "type": "uint256" }, + { "internalType": "string", "name": "reason", "type": "string" } + ], + "name": "FailedOp", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "sender", "type": "address" } + ], + "name": "SenderAddressResult", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "aggregator", "type": "address" } + ], + "name": "SignatureValidationFailed", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "preOpGas", + "type": "uint256" + }, + { "internalType": "uint256", "name": "prefund", "type": "uint256" }, + { "internalType": "bool", "name": "sigFailed", "type": "bool" }, + { + "internalType": "uint48", + "name": "validAfter", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + }, + { + "internalType": "bytes", + "name": "paymasterContext", + "type": "bytes" + } + ], + "internalType": "struct IEntryPoint.ReturnInfo", + "name": "returnInfo", + "type": "tuple" + }, + { + "components": [ + { "internalType": "uint256", "name": "stake", "type": "uint256" }, + { + "internalType": "uint256", + "name": "unstakeDelaySec", + "type": "uint256" + } + ], + "internalType": "struct IStakeManager.StakeInfo", + "name": "senderInfo", + "type": "tuple" + }, + { + "components": [ + { "internalType": "uint256", "name": "stake", "type": "uint256" }, + { + "internalType": "uint256", + "name": "unstakeDelaySec", + "type": "uint256" + } + ], + "internalType": "struct IStakeManager.StakeInfo", + "name": "factoryInfo", + "type": "tuple" + }, + { + "components": [ + { "internalType": "uint256", "name": "stake", "type": "uint256" }, + { + "internalType": "uint256", + "name": "unstakeDelaySec", + "type": "uint256" + } + ], + "internalType": "struct IStakeManager.StakeInfo", + "name": "paymasterInfo", + "type": "tuple" + } + ], + "name": "ValidationResult", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "preOpGas", + "type": "uint256" + }, + { "internalType": "uint256", "name": "prefund", "type": "uint256" }, + { "internalType": "bool", "name": "sigFailed", "type": "bool" }, + { + "internalType": "uint48", + "name": "validAfter", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + }, + { + "internalType": "bytes", + "name": "paymasterContext", + "type": "bytes" + } + ], + "internalType": "struct IEntryPoint.ReturnInfo", + "name": "returnInfo", + "type": "tuple" + }, + { + "components": [ + { "internalType": "uint256", "name": "stake", "type": "uint256" }, + { + "internalType": "uint256", + "name": "unstakeDelaySec", + "type": "uint256" + } + ], + "internalType": "struct IStakeManager.StakeInfo", + "name": "senderInfo", + "type": "tuple" + }, + { + "components": [ + { "internalType": "uint256", "name": "stake", "type": "uint256" }, + { + "internalType": "uint256", + "name": "unstakeDelaySec", + "type": "uint256" + } + ], + "internalType": "struct IStakeManager.StakeInfo", + "name": "factoryInfo", + "type": "tuple" + }, + { + "components": [ + { "internalType": "uint256", "name": "stake", "type": "uint256" }, + { + "internalType": "uint256", + "name": "unstakeDelaySec", + "type": "uint256" + } + ], + "internalType": "struct IStakeManager.StakeInfo", + "name": "paymasterInfo", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "aggregator", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "stake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "unstakeDelaySec", + "type": "uint256" + } + ], + "internalType": "struct IStakeManager.StakeInfo", + "name": "stakeInfo", + "type": "tuple" + } + ], + "internalType": "struct IEntryPoint.AggregatorStakeInfo", + "name": "aggregatorInfo", + "type": "tuple" + } + ], + "name": "ValidationResultWithAggregation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "paymaster", + "type": "address" + } + ], + "name": "AccountDeployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "BeforeExecution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalDeposit", + "type": "uint256" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "aggregator", + "type": "address" + } + ], + "name": "SignatureAggregatorChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalStaked", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "unstakeDelaySec", + "type": "uint256" + } + ], + "name": "StakeLocked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawTime", + "type": "uint256" + } + ], + "name": "StakeUnlocked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "StakeWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "paymaster", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "actualGasCost", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "actualGasUsed", + "type": "uint256" + } + ], + "name": "UserOperationEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "revertReason", + "type": "bytes" + } + ], + "name": "UserOperationRevertReason", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "SIG_VALIDATION_FAILED", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes", "name": "initCode", "type": "bytes" }, + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "bytes", "name": "paymasterAndData", "type": "bytes" } + ], + "name": "_validateSenderAndPaymaster", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "deposits", + "outputs": [ + { "internalType": "uint112", "name": "deposit", "type": "uint112" }, + { "internalType": "bool", "name": "staked", "type": "bool" }, + { "internalType": "uint112", "name": "stake", "type": "uint112" }, + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + }, + { "internalType": "uint48", "name": "withdrawTime", "type": "uint48" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "getDepositInfo", + "outputs": [ + { + "components": [ + { "internalType": "uint112", "name": "deposit", "type": "uint112" }, + { "internalType": "bool", "name": "staked", "type": "bool" }, + { "internalType": "uint112", "name": "stake", "type": "uint112" }, + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + }, + { + "internalType": "uint48", + "name": "withdrawTime", + "type": "uint48" + } + ], + "internalType": "struct IStakeManager.DepositInfo", + "name": "info", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "uint192", "name": "key", "type": "uint192" } + ], + "name": "getNonce", + "outputs": [ + { "internalType": "uint256", "name": "nonce", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes", "name": "initCode", "type": "bytes" } + ], + "name": "getSenderAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "uint256", "name": "nonce", "type": "uint256" }, + { "internalType": "bytes", "name": "initCode", "type": "bytes" }, + { "internalType": "bytes", "name": "callData", "type": "bytes" }, + { + "internalType": "uint256", + "name": "callGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "verificationGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" } + ], + "internalType": "struct UserOperation", + "name": "userOp", + "type": "tuple" + } + ], + "name": "getUserOpHash", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "callGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "verificationGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct UserOperation[]", + "name": "userOps", + "type": "tuple[]" + }, + { + "internalType": "contract IAggregator", + "name": "aggregator", + "type": "address" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" } + ], + "internalType": "struct IEntryPoint.UserOpsPerAggregator[]", + "name": "opsPerAggregator", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + } + ], + "name": "handleAggregatedOps", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "uint256", "name": "nonce", "type": "uint256" }, + { "internalType": "bytes", "name": "initCode", "type": "bytes" }, + { "internalType": "bytes", "name": "callData", "type": "bytes" }, + { + "internalType": "uint256", + "name": "callGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "verificationGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" } + ], + "internalType": "struct UserOperation[]", + "name": "ops", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + } + ], + "name": "handleOps", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint192", "name": "key", "type": "uint192" } + ], + "name": "incrementNonce", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes", "name": "callData", "type": "bytes" }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "verificationGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "address", + "name": "paymaster", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + } + ], + "internalType": "struct EntryPoint.MemoryUserOp", + "name": "mUserOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { "internalType": "uint256", "name": "prefund", "type": "uint256" }, + { + "internalType": "uint256", + "name": "contextOffset", + "type": "uint256" + }, + { "internalType": "uint256", "name": "preOpGas", "type": "uint256" } + ], + "internalType": "struct EntryPoint.UserOpInfo", + "name": "opInfo", + "type": "tuple" + }, + { "internalType": "bytes", "name": "context", "type": "bytes" } + ], + "name": "innerHandleOp", + "outputs": [ + { + "internalType": "uint256", + "name": "actualGasCost", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint192", "name": "", "type": "uint192" } + ], + "name": "nonceSequenceNumber", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "uint256", "name": "nonce", "type": "uint256" }, + { "internalType": "bytes", "name": "initCode", "type": "bytes" }, + { "internalType": "bytes", "name": "callData", "type": "bytes" }, + { + "internalType": "uint256", + "name": "callGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "verificationGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" } + ], + "internalType": "struct UserOperation", + "name": "op", + "type": "tuple" + }, + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bytes", "name": "targetCallData", "type": "bytes" } + ], + "name": "simulateHandleOp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "uint256", "name": "nonce", "type": "uint256" }, + { "internalType": "bytes", "name": "initCode", "type": "bytes" }, + { "internalType": "bytes", "name": "callData", "type": "bytes" }, + { + "internalType": "uint256", + "name": "callGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "verificationGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" } + ], + "internalType": "struct UserOperation", + "name": "userOp", + "type": "tuple" + } + ], + "name": "simulateValidation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { "stateMutability": "payable", "type": "receive" } +] \ No newline at end of file diff --git a/frontend/public/abi/TokenPrice.json b/frontend/public/abi/TokenPrice.json new file mode 100644 index 0000000..6a2112d --- /dev/null +++ b/frontend/public/abi/TokenPrice.json @@ -0,0 +1,411 @@ +[ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_demoAddr", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "err", + "type": "uint32" + } + ], + "name": "FetchPriceError", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "err", + "type": "bytes" + } + ], + "name": "FetchPriceRet", + "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": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "HA", + "outputs": [ + { + "internalType": "contract HybridAccount", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "token", + "type": "string" + } + ], + "name": "fetchPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "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": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "tokenPrices", + "outputs": [ + { + "internalType": "string", + "name": "price", + "type": "string" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/frontend/src/abi/EP.json b/frontend/src/abi/EP.json deleted file mode 100644 index 8d84187..0000000 --- a/frontend/src/abi/EP.json +++ /dev/null @@ -1,1011 +0,0 @@ -{ - "abi": [ - { - "inputs": [ - { "internalType": "uint256", "name": "preOpGas", "type": "uint256" }, - { "internalType": "uint256", "name": "paid", "type": "uint256" }, - { "internalType": "uint48", "name": "validAfter", "type": "uint48" }, - { "internalType": "uint48", "name": "validUntil", "type": "uint48" }, - { "internalType": "bool", "name": "targetSuccess", "type": "bool" }, - { "internalType": "bytes", "name": "targetResult", "type": "bytes" } - ], - "name": "ExecutionResult", - "type": "error" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "opIndex", "type": "uint256" }, - { "internalType": "string", "name": "reason", "type": "string" } - ], - "name": "FailedOp", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "SenderAddressResult", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "aggregator", "type": "address" } - ], - "name": "SignatureValidationFailed", - "type": "error" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "preOpGas", - "type": "uint256" - }, - { "internalType": "uint256", "name": "prefund", "type": "uint256" }, - { "internalType": "bool", "name": "sigFailed", "type": "bool" }, - { - "internalType": "uint48", - "name": "validAfter", - "type": "uint48" - }, - { - "internalType": "uint48", - "name": "validUntil", - "type": "uint48" - }, - { - "internalType": "bytes", - "name": "paymasterContext", - "type": "bytes" - } - ], - "internalType": "struct IEntryPoint.ReturnInfo", - "name": "returnInfo", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "stake", "type": "uint256" }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "senderInfo", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "stake", "type": "uint256" }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "factoryInfo", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "stake", "type": "uint256" }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "paymasterInfo", - "type": "tuple" - } - ], - "name": "ValidationResult", - "type": "error" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "preOpGas", - "type": "uint256" - }, - { "internalType": "uint256", "name": "prefund", "type": "uint256" }, - { "internalType": "bool", "name": "sigFailed", "type": "bool" }, - { - "internalType": "uint48", - "name": "validAfter", - "type": "uint48" - }, - { - "internalType": "uint48", - "name": "validUntil", - "type": "uint48" - }, - { - "internalType": "bytes", - "name": "paymasterContext", - "type": "bytes" - } - ], - "internalType": "struct IEntryPoint.ReturnInfo", - "name": "returnInfo", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "stake", "type": "uint256" }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "senderInfo", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "stake", "type": "uint256" }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "factoryInfo", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "stake", "type": "uint256" }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "paymasterInfo", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "aggregator", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "stakeInfo", - "type": "tuple" - } - ], - "internalType": "struct IEntryPoint.AggregatorStakeInfo", - "name": "aggregatorInfo", - "type": "tuple" - } - ], - "name": "ValidationResultWithAggregation", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "userOpHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "factory", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "paymaster", - "type": "address" - } - ], - "name": "AccountDeployed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "BeforeExecution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalDeposit", - "type": "uint256" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "aggregator", - "type": "address" - } - ], - "name": "SignatureAggregatorChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawTime", - "type": "uint256" - } - ], - "name": "StakeUnlocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "withdrawAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "StakeWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "userOpHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "paymaster", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "success", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "actualGasCost", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "actualGasUsed", - "type": "uint256" - } - ], - "name": "UserOperationEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "userOpHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "revertReason", - "type": "bytes" - } - ], - "name": "UserOperationRevertReason", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "withdrawAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "inputs": [], - "name": "SIG_VALIDATION_FAILED", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "initCode", "type": "bytes" }, - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "bytes", "name": "paymasterAndData", "type": "bytes" } - ], - "name": "_validateSenderAndPaymaster", - "outputs": [], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "unstakeDelaySec", - "type": "uint32" - } - ], - "name": "addStake", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "depositTo", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "deposits", - "outputs": [ - { "internalType": "uint112", "name": "deposit", "type": "uint112" }, - { "internalType": "bool", "name": "staked", "type": "bool" }, - { "internalType": "uint112", "name": "stake", "type": "uint112" }, - { - "internalType": "uint32", - "name": "unstakeDelaySec", - "type": "uint32" - }, - { "internalType": "uint48", "name": "withdrawTime", "type": "uint48" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "getDepositInfo", - "outputs": [ - { - "components": [ - { "internalType": "uint112", "name": "deposit", "type": "uint112" }, - { "internalType": "bool", "name": "staked", "type": "bool" }, - { "internalType": "uint112", "name": "stake", "type": "uint112" }, - { - "internalType": "uint32", - "name": "unstakeDelaySec", - "type": "uint32" - }, - { - "internalType": "uint48", - "name": "withdrawTime", - "type": "uint48" - } - ], - "internalType": "struct IStakeManager.DepositInfo", - "name": "info", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "uint192", "name": "key", "type": "uint192" } - ], - "name": "getNonce", - "outputs": [ - { "internalType": "uint256", "name": "nonce", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "initCode", "type": "bytes" } - ], - "name": "getSenderAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" }, - { "internalType": "bytes", "name": "initCode", "type": "bytes" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } - ], - "internalType": "struct UserOperation", - "name": "userOp", - "type": "tuple" - } - ], - "name": "getUserOpHash", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "initCode", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct UserOperation[]", - "name": "userOps", - "type": "tuple[]" - }, - { - "internalType": "contract IAggregator", - "name": "aggregator", - "type": "address" - }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } - ], - "internalType": "struct IEntryPoint.UserOpsPerAggregator[]", - "name": "opsPerAggregator", - "type": "tuple[]" - }, - { - "internalType": "address payable", - "name": "beneficiary", - "type": "address" - } - ], - "name": "handleAggregatedOps", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" }, - { "internalType": "bytes", "name": "initCode", "type": "bytes" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } - ], - "internalType": "struct UserOperation[]", - "name": "ops", - "type": "tuple[]" - }, - { - "internalType": "address payable", - "name": "beneficiary", - "type": "address" - } - ], - "name": "handleOps", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint192", "name": "key", "type": "uint192" } - ], - "name": "incrementNonce", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "callData", "type": "bytes" }, - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymaster", - "type": "address" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - } - ], - "internalType": "struct EntryPoint.MemoryUserOp", - "name": "mUserOp", - "type": "tuple" - }, - { - "internalType": "bytes32", - "name": "userOpHash", - "type": "bytes32" - }, - { "internalType": "uint256", "name": "prefund", "type": "uint256" }, - { - "internalType": "uint256", - "name": "contextOffset", - "type": "uint256" - }, - { "internalType": "uint256", "name": "preOpGas", "type": "uint256" } - ], - "internalType": "struct EntryPoint.UserOpInfo", - "name": "opInfo", - "type": "tuple" - }, - { "internalType": "bytes", "name": "context", "type": "bytes" } - ], - "name": "innerHandleOp", - "outputs": [ - { - "internalType": "uint256", - "name": "actualGasCost", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint192", "name": "", "type": "uint192" } - ], - "name": "nonceSequenceNumber", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" }, - { "internalType": "bytes", "name": "initCode", "type": "bytes" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } - ], - "internalType": "struct UserOperation", - "name": "op", - "type": "tuple" - }, - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "targetCallData", "type": "bytes" } - ], - "name": "simulateHandleOp", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" }, - { "internalType": "bytes", "name": "initCode", "type": "bytes" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } - ], - "internalType": "struct UserOperation", - "name": "userOp", - "type": "tuple" - } - ], - "name": "simulateValidation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "withdrawAddress", - "type": "address" - } - ], - "name": "withdrawStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "withdrawAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "withdrawAmount", - "type": "uint256" - } - ], - "name": "withdrawTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } - ], - "address": "0x4667F5C81e302Cb770944F4aEd2d6BCbf98097fB" -} diff --git a/frontend/src/abi/TokenPrice.json b/frontend/src/abi/TokenPrice.json deleted file mode 100644 index 2d232e6..0000000 --- a/frontend/src/abi/TokenPrice.json +++ /dev/null @@ -1 +0,0 @@ -{"abi":[{"type":"constructor","inputs":[{"name":"_helperAddr","type":"address","internalType":"address payable"}],"stateMutability":"nonpayable"},{"type":"function","name":"fetchPrice","inputs":[{"name":"token","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getTest","inputs":[{"name":"token","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokenPrices","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"price","type":"string","internalType":"string"},{"name":"timestamp","type":"uint256","internalType":"uint256"}],"stateMutability":"view"}],"bytecode":{"object":"0x60a0604052348015600f57600080fd5b506040516108bc3803806108bc833981016040819052602c91603c565b6001600160a01b0316608052606a565b600060208284031215604d57600080fd5b81516001600160a01b0381168114606357600080fd5b9392505050565b608051610837610085600039600061010201526108376000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806365543de0146100465780639782dd2a1461005b578063e19cb3801461006e575b600080fd5b61005961005436600461035e565b610098565b005b61005961006936600461035e565b6100fe565b61008161007c36600461043f565b6102af565b60405161008f92919061050f565b60405180910390f35b60408051608081018252600281830190815261031360f41b6060830152815242602082015290516000906100cf9085908590610531565b908152604051908190036020019020815181906100ec90826105cc565b50602082015181600101559050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000905060606000848460405160240161013a92919061068c565b60408051601f19818403018152918152602080830180516001600160e01b031663134f716b60e01b179052815133918101919091529192506000910160405160208183030381529060405261018e906106bb565b9050600080856001600160a01b031663839f845784866040518363ffffffff1660e01b81526004016101c19291906106df565b6000604051808303816000875af11580156101e0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102089190810190610737565b915091508163ffffffff1660001461023d578060405162461bcd60e51b815260040161023491906107a5565b60405180910390fd5b8080602001905181019061025191906107b8565b94506040518060400160405280868152602001428152506000898960405161027a929190610531565b9081526040519081900360200190208151819061029790826105cc565b50602082015181600101559050505050505050505050565b80516020818301810180516000825292820191909301209152805481906102d590610541565b80601f016020809104026020016040519081016040528092919081815260200182805461030190610541565b801561034e5780601f106103235761010080835404028352916020019161034e565b820191906000526020600020905b81548152906001019060200180831161033157829003601f168201915b5050505050908060010154905082565b6000806020838503121561037157600080fd5b823567ffffffffffffffff8082111561038957600080fd5b818501915085601f83011261039d57600080fd5b8135818111156103ac57600080fd5b8660208285010111156103be57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561040f5761040f6103d0565b604052919050565b600067ffffffffffffffff821115610431576104316103d0565b50601f01601f191660200190565b60006020828403121561045157600080fd5b813567ffffffffffffffff81111561046857600080fd5b8201601f8101841361047957600080fd5b803561048c61048782610417565b6103e6565b8181528560208385010111156104a157600080fd5b81602084016020830137600091810160200191909152949350505050565b60005b838110156104da5781810151838201526020016104c2565b50506000910152565b600081518084526104fb8160208601602086016104bf565b601f01601f19169290920160200192915050565b60408152600061052260408301856104e3565b90508260208301529392505050565b8183823760009101908152919050565b600181811c9082168061055557607f821691505b60208210810361057557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105c7576000816000526020600020601f850160051c810160208610156105a45750805b601f850160051c820191505b818110156105c3578281556001016105b0565b5050505b505050565b815167ffffffffffffffff8111156105e6576105e66103d0565b6105fa816105f48454610541565b8461057b565b602080601f83116001811461062f57600084156106175750858301515b600019600386901b1c1916600185901b1785556105c3565b600085815260208120601f198616915b8281101561065e5788860151825594840194600190910190840161063f565b508582101561067c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b805160208083015191908110156105755760001960209190910360031b1b16919050565b8281526040602082015260006106f860408301846104e3565b949350505050565b600061070e61048784610417565b905082815283838301111561072257600080fd5b6107308360208301846104bf565b9392505050565b6000806040838503121561074a57600080fd5b825163ffffffff8116811461075e57600080fd5b602084015190925067ffffffffffffffff81111561077b57600080fd5b8301601f8101851361078c57600080fd5b61079b85825160208401610700565b9150509250929050565b60208152600061073060208301846104e3565b6000602082840312156107ca57600080fd5b815167ffffffffffffffff8111156107e157600080fd5b8201601f810184136107f257600080fd5b6106f88482516020840161070056fea2646970667358221220868de4ea657eafcd9e46e6572b0efd74addda6b8c2f6780bc0cc2e8edee6661f64736f6c63430008190033","sourceMap":"101:1092:1:-:0;;;316:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;367:24:1;;;101:1092;;14:298:83;92:6;145:2;133:9;124:7;120:23;116:32;113:52;;;161:1;158;151:12;113:52;187:16;;-1:-1:-1;;;;;232:31:83;;222:42;;212:70;;278:1;275;268:12;212:70;301:5;14:298;-1:-1:-1;;;14:298:83:o;:::-;101:1092:1;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106100415760003560e01c806365543de0146100465780639782dd2a1461005b578063e19cb3801461006e575b600080fd5b61005961005436600461035e565b610098565b005b61005961006936600461035e565b6100fe565b61008161007c36600461043f565b6102af565b60405161008f92919061050f565b60405180910390f35b60408051608081018252600281830190815261031360f41b6060830152815242602082015290516000906100cf9085908590610531565b908152604051908190036020019020815181906100ec90826105cc565b50602082015181600101559050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000905060606000848460405160240161013a92919061068c565b60408051601f19818403018152918152602080830180516001600160e01b031663134f716b60e01b179052815133918101919091529192506000910160405160208183030381529060405261018e906106bb565b9050600080856001600160a01b031663839f845784866040518363ffffffff1660e01b81526004016101c19291906106df565b6000604051808303816000875af11580156101e0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102089190810190610737565b915091508163ffffffff1660001461023d578060405162461bcd60e51b815260040161023491906107a5565b60405180910390fd5b8080602001905181019061025191906107b8565b94506040518060400160405280868152602001428152506000898960405161027a929190610531565b9081526040519081900360200190208151819061029790826105cc565b50602082015181600101559050505050505050505050565b80516020818301810180516000825292820191909301209152805481906102d590610541565b80601f016020809104026020016040519081016040528092919081815260200182805461030190610541565b801561034e5780601f106103235761010080835404028352916020019161034e565b820191906000526020600020905b81548152906001019060200180831161033157829003601f168201915b5050505050908060010154905082565b6000806020838503121561037157600080fd5b823567ffffffffffffffff8082111561038957600080fd5b818501915085601f83011261039d57600080fd5b8135818111156103ac57600080fd5b8660208285010111156103be57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561040f5761040f6103d0565b604052919050565b600067ffffffffffffffff821115610431576104316103d0565b50601f01601f191660200190565b60006020828403121561045157600080fd5b813567ffffffffffffffff81111561046857600080fd5b8201601f8101841361047957600080fd5b803561048c61048782610417565b6103e6565b8181528560208385010111156104a157600080fd5b81602084016020830137600091810160200191909152949350505050565b60005b838110156104da5781810151838201526020016104c2565b50506000910152565b600081518084526104fb8160208601602086016104bf565b601f01601f19169290920160200192915050565b60408152600061052260408301856104e3565b90508260208301529392505050565b8183823760009101908152919050565b600181811c9082168061055557607f821691505b60208210810361057557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105c7576000816000526020600020601f850160051c810160208610156105a45750805b601f850160051c820191505b818110156105c3578281556001016105b0565b5050505b505050565b815167ffffffffffffffff8111156105e6576105e66103d0565b6105fa816105f48454610541565b8461057b565b602080601f83116001811461062f57600084156106175750858301515b600019600386901b1c1916600185901b1785556105c3565b600085815260208120601f198616915b8281101561065e5788860151825594840194600190910190840161063f565b508582101561067c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b805160208083015191908110156105755760001960209190910360031b1b16919050565b8281526040602082015260006106f860408301846104e3565b949350505050565b600061070e61048784610417565b905082815283838301111561072257600080fd5b6107308360208301846104bf565b9392505050565b6000806040838503121561074a57600080fd5b825163ffffffff8116811461075e57600080fd5b602084015190925067ffffffffffffffff81111561077b57600080fd5b8301601f8101851361078c57600080fd5b61079b85825160208401610700565b9150509250929050565b60208152600061073060208301846104e3565b6000602082840312156107ca57600080fd5b815167ffffffffffffffff8111156107e157600080fd5b8201601f810184136107f257600080fd5b6106f88482516020840161070056fea2646970667358221220868de4ea657eafcd9e46e6572b0efd74addda6b8c2f6780bc0cc2e8edee6661f64736f6c63430008190033","sourceMap":"101:1092:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;404:178;;;;;;:::i;:::-;;:::i;:::-;;588:603;;;;;;:::i;:::-;;:::i;127:54::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;404:178;482:93;;;;;;;;;;;;;;;-1:-1:-1;;;482:93:1;;;;;;549:15;482:93;;;;461:18;;-1:-1:-1;;461:18:1;;473:5;;;;461:18;:::i;:::-;;;;;;;;;;;;;;:114;;:18;;:114;;:18;:114;:::i;:::-;;;;;;;;;;;;;404:178;;:::o;588:603::-;648:16;689:10;648:53;;711:19;741:16;804:5;;760:50;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;760:50:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;760:50:1;-1:-1:-1;;;760:50:1;;;846:22;;857:10;846:22;;;6119:51:83;;;;760:50:1;;-1:-1:-1;;;6092:18:83;846:22:1;;;;;;;;;;;;838:31;;;:::i;:::-;820:49;;880:12;894:16;914:2;-1:-1:-1;;;;;914:15:1;;930:7;939:3;914:29;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;914:29:1;;;;;;;;;;;;:::i;:::-;879:64;;;;958:5;:10;;967:1;958:10;954:60;;998:3;984:19;;-1:-1:-1;;;984:19:1;;;;;;;;:::i;:::-;;;;;;;;954:60;1045:3;1034:25;;;;;;;;;;;;:::i;:::-;1024:35;;1090:94;;;;;;;;1128:5;1090:94;;;;1158:15;1090:94;;;1069:11;1081:5;;1069:18;;;;;;;:::i;:::-;;;;;;;;;;;;;;:115;;:18;;:115;;:18;:115;:::i;:::-;;;;;;;;;;;;;638:553;;;;;;588:603;;:::o;127:54::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:592:83:-;85:6;93;146:2;134:9;125:7;121:23;117:32;114:52;;;162:1;159;152:12;114:52;202:9;189:23;231:18;272:2;264:6;261:14;258:34;;;288:1;285;278:12;258:34;326:6;315:9;311:22;301:32;;371:7;364:4;360:2;356:13;352:27;342:55;;393:1;390;383:12;342:55;433:2;420:16;459:2;451:6;448:14;445:34;;;475:1;472;465:12;445:34;520:7;515:2;506:6;502:2;498:15;494:24;491:37;488:57;;;541:1;538;531:12;488:57;572:2;564:11;;;;;594:6;;-1:-1:-1;14:592:83;;-1:-1:-1;;;;14:592:83:o;611:127::-;672:10;667:3;663:20;660:1;653:31;703:4;700:1;693:15;727:4;724:1;717:15;743:275;814:2;808:9;879:2;860:13;;-1:-1:-1;;856:27:83;844:40;;914:18;899:34;;935:22;;;896:62;893:88;;;961:18;;:::i;:::-;997:2;990:22;743:275;;-1:-1:-1;743:275:83:o;1023:187::-;1072:4;1105:18;1097:6;1094:30;1091:56;;;1127:18;;:::i;:::-;-1:-1:-1;1193:2:83;1172:15;-1:-1:-1;;1168:29:83;1199:4;1164:40;;1023:187::o;1215:673::-;1284:6;1337:2;1325:9;1316:7;1312:23;1308:32;1305:52;;;1353:1;1350;1343:12;1305:52;1393:9;1380:23;1426:18;1418:6;1415:30;1412:50;;;1458:1;1455;1448:12;1412:50;1481:22;;1534:4;1526:13;;1522:27;-1:-1:-1;1512:55:83;;1563:1;1560;1553:12;1512:55;1599:2;1586:16;1624:49;1640:32;1669:2;1640:32;:::i;:::-;1624:49;:::i;:::-;1696:2;1689:5;1682:17;1736:7;1731:2;1726;1722;1718:11;1714:20;1711:33;1708:53;;;1757:1;1754;1747:12;1708:53;1812:2;1807;1803;1799:11;1794:2;1787:5;1783:14;1770:45;1856:1;1835:14;;;1851:2;1831:23;1824:34;;;;1839:5;1215:673;-1:-1:-1;;;;1215:673:83:o;1893:250::-;1978:1;1988:113;2002:6;1999:1;1996:13;1988:113;;;2078:11;;;2072:18;2059:11;;;2052:39;2024:2;2017:10;1988:113;;;-1:-1:-1;;2135:1:83;2117:16;;2110:27;1893:250::o;2148:271::-;2190:3;2228:5;2222:12;2255:6;2250:3;2243:19;2271:76;2340:6;2333:4;2328:3;2324:14;2317:4;2310:5;2306:16;2271:76;:::i;:::-;2401:2;2380:15;-1:-1:-1;;2376:29:83;2367:39;;;;2408:4;2363:50;;2148:271;-1:-1:-1;;2148:271:83:o;2424:291::-;2601:2;2590:9;2583:21;2564:4;2621:45;2662:2;2651:9;2647:18;2639:6;2621:45;:::i;:::-;2613:53;;2702:6;2697:2;2686:9;2682:18;2675:34;2424:291;;;;;:::o;2720:273::-;2905:6;2897;2892:3;2879:33;2861:3;2931:16;;2956:13;;;2931:16;2720:273;-1:-1:-1;2720:273:83:o;2998:380::-;3077:1;3073:12;;;;3120;;;3141:61;;3195:4;3187:6;3183:17;3173:27;;3141:61;3248:2;3240:6;3237:14;3217:18;3214:38;3211:161;;3294:10;3289:3;3285:20;3282:1;3275:31;3329:4;3326:1;3319:15;3357:4;3354:1;3347:15;3211:161;;2998:380;;;:::o;3509:543::-;3611:2;3606:3;3603:11;3600:446;;;3647:1;3671:5;3668:1;3661:16;3715:4;3712:1;3702:18;3785:2;3773:10;3769:19;3766:1;3762:27;3756:4;3752:38;3821:4;3809:10;3806:20;3803:47;;;-1:-1:-1;3844:4:83;3803:47;3899:2;3894:3;3890:12;3887:1;3883:20;3877:4;3873:31;3863:41;;3954:82;3972:2;3965:5;3962:13;3954:82;;;4017:17;;;3998:1;3987:13;3954:82;;;3958:3;;;3600:446;3509:543;;;:::o;4228:1345::-;4354:3;4348:10;4381:18;4373:6;4370:30;4367:56;;;4403:18;;:::i;:::-;4432:97;4522:6;4482:38;4514:4;4508:11;4482:38;:::i;:::-;4476:4;4432:97;:::i;:::-;4584:4;;4641:2;4630:14;;4658:1;4653:663;;;;5360:1;5377:6;5374:89;;;-1:-1:-1;5429:19:83;;;5423:26;5374:89;-1:-1:-1;;4185:1:83;4181:11;;;4177:24;4173:29;4163:40;4209:1;4205:11;;;4160:57;5476:81;;4623:944;;4653:663;3456:1;3449:14;;;3493:4;3480:18;;-1:-1:-1;;4689:20:83;;;4807:236;4821:7;4818:1;4815:14;4807:236;;;4910:19;;;4904:26;4889:42;;5002:27;;;;4970:1;4958:14;;;;4837:19;;4807:236;;;4811:3;5071:6;5062:7;5059:19;5056:201;;;5132:19;;;5126:26;-1:-1:-1;;5215:1:83;5211:14;;;5227:3;5207:24;5203:37;5199:42;5184:58;5169:74;;5056:201;-1:-1:-1;;;;;5303:1:83;5287:14;;;5283:22;5270:36;;-1:-1:-1;4228:1345:83:o;5578:390::-;5737:2;5726:9;5719:21;5776:6;5771:2;5760:9;5756:18;5749:34;5833:6;5825;5820:2;5809:9;5805:18;5792:48;5889:1;5860:22;;;5884:2;5856:31;;;5849:42;;;;5952:2;5931:15;;;-1:-1:-1;;5927:29:83;5912:45;5908:54;;5578:390;-1:-1:-1;5578:390:83:o;6181:297::-;6299:12;;6346:4;6335:16;;;6329:23;;6299:12;6364:16;;6361:111;;;-1:-1:-1;;6438:4:83;6434:17;;;;6431:1;6427:25;6423:38;6412:50;;6181:297;-1:-1:-1;6181:297:83:o;6483:289::-;6658:6;6647:9;6640:25;6701:2;6696;6685:9;6681:18;6674:30;6621:4;6721:45;6762:2;6751:9;6747:18;6739:6;6721:45;:::i;:::-;6713:53;6483:289;-1:-1:-1;;;;6483:289:83:o;6777:321::-;6852:5;6881:53;6897:36;6926:6;6897:36;:::i;6881:53::-;6872:62;;6957:6;6950:5;6943:21;6997:3;6988:6;6983:3;6979:16;6976:25;6973:45;;;7014:1;7011;7004:12;6973:45;7027:65;7085:6;7078:4;7071:5;7067:16;7062:3;7027:65;:::i;:::-;6777:321;;;;;:::o;7103:614::-;7190:6;7198;7251:2;7239:9;7230:7;7226:23;7222:32;7219:52;;;7267:1;7264;7257:12;7219:52;7299:9;7293:16;7349:10;7342:5;7338:22;7331:5;7328:33;7318:61;;7375:1;7372;7365:12;7318:61;7447:2;7432:18;;7426:25;7398:5;;-1:-1:-1;7474:18:83;7463:30;;7460:50;;;7506:1;7503;7496:12;7460:50;7529:22;;7582:4;7574:13;;7570:27;-1:-1:-1;7560:55:83;;7611:1;7608;7601:12;7560:55;7634:77;7703:7;7698:2;7692:9;7687:2;7683;7679:11;7634:77;:::i;:::-;7624:87;;;7103:614;;;;;:::o;7722:220::-;7871:2;7860:9;7853:21;7834:4;7891:45;7932:2;7921:9;7917:18;7909:6;7891:45;:::i;7947:458::-;8027:6;8080:2;8068:9;8059:7;8055:23;8051:32;8048:52;;;8096:1;8093;8086:12;8048:52;8129:9;8123:16;8162:18;8154:6;8151:30;8148:50;;;8194:1;8191;8184:12;8148:50;8217:22;;8270:4;8262:13;;8258:27;-1:-1:-1;8248:55:83;;8299:1;8296;8289:12;8248:55;8322:77;8391:7;8386:2;8380:9;8375:2;8371;8367:11;8322:77;:::i","linkReferences":{},"immutableReferences":{"88":[{"start":258,"length":32}]}},"methodIdentifiers":{"fetchPrice(string)":"9782dd2a","getTest(string)":"65543de0","tokenPrices(string)":"e19cb380"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_helperAddr\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"token\",\"type\":\"string\"}],\"name\":\"fetchPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"token\",\"type\":\"string\"}],\"name\":\"getTest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokenPrices\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"price\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TokenPrice.sol\":\"TokenPrice\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=lib/forge-std/src/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"contracts/TokenPrice.sol\":{\"keccak256\":\"0x8c5fadd42f185e592c9b7d7940ddd005ef82d604051335ba887692f31d800b84\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://db22302503b154aa03e5a08a1380d58092c419641349c05534569a80fad260ff\",\"dweb:/ipfs/QmP2acLJiLxMhUjdPjRxEzo7yLt16CPcdLdFRSykuUvbqW\"]},\"contracts/core/BaseAccount.sol\":{\"keccak256\":\"0x5eb3253b32fd8ba8ae7b9d83da8e9924254a4d3d17a8772b41280e8572974b3c\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b2d23d1276f85300e2ad0c7219614a072796b4f5581fd552b0bcaa47904400d3\",\"dweb:/ipfs/QmVWK5WZ3VskNTfCBxLqY4xBP7WGm3cRM9Qhdy56f5TfAk\"]},\"contracts/core/Helpers.sol\":{\"keccak256\":\"0x591c87519f7155d1909210276b77925ab2722a99b7b5d5649aecc36ebbdb045a\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://69643e83f68e6a13d5075c7565bfce326673b0bd98c432033c4603ea84835746\",\"dweb:/ipfs/QmSwSzjYyV7qudi5vvsmzHMG2Z4YJZxX51RRXXVCLaNcEU\"]},\"contracts/interfaces/IAccount.sol\":{\"keccak256\":\"0x556a0e5980de18e90b115553ed502408155ba35f58642823010d9288047bc418\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://a0f420134b79596db8737173c7b933ae0a33059e107b6327c43aa40d4744a9e4\",\"dweb:/ipfs/QmRo8s1AhXmEMV7uPYnbpYwU19e9Bk6jmYBJTiPx3Fo85W\"]},\"contracts/interfaces/IAggregator.sol\":{\"keccak256\":\"0x060e9ddb0152250c269ba0640dc5753834ac44cf182a2837d508c0c529cae26a\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://20ed837bc5909c89ff1910246bf245a5dad6840aa939382e1694964eb7dbd37b\",\"dweb:/ipfs/QmTMybRq5yyghPDDs1ZCNAVB9sSJ4WHe6Q9mejuKPTAdNP\"]},\"contracts/interfaces/IEntryPoint.sol\":{\"keccak256\":\"0x3a90bf308819ed125fa4202f880999caff8a8686633b8ddb79a30ca240d5b8f8\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d2d21cc92c2fdab2b58d21bc25d4cd0e8c284b922528a186b087b818d54bc6cf\",\"dweb:/ipfs/QmT1qrfuBjsv2rmRCDn8mgPXHp94hARJwzbcDuBLDTbFWd\"]},\"contracts/interfaces/INonceManager.sol\":{\"keccak256\":\"0x509871e6c63663cdcc3eba19920fe84e991f38b289b1377ac3c3a6d9f22d7e12\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://00fe21b4349b24c50df60e1a705179293982bd9e7a32b78d4bac9620f89e7fe2\",\"dweb:/ipfs/QmSFFYGfUwQbVa6hASjU7YxTvgi2HkfrPr4X5oPHscHg8b\"]},\"contracts/interfaces/IStakeManager.sol\":{\"keccak256\":\"0xd227b02888cd4ac68daebcdfd992ec00f9fff66fa3b3bb16f656cd582fa3480f\",\"license\":\"GPL-3.0-only\",\"urls\":[\"bzz-raw://b389da4714a138be63704a576a482505eab2855e263b38a93706395d8d42e7c3\",\"dweb:/ipfs/QmeeAZpdHwUXxqP8pxA7GNtoCGBmmH4FaqLLwScVKGxtxZ\"]},\"contracts/interfaces/UserOperation.sol\":{\"keccak256\":\"0x61374003361059087fdcf17967a7bba052badeaf5c7f0ae689166f8aafd3a45c\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://6ff83c59432e733bf6304dda27cd4b0f34401917dd535e2669cc842d2d26568c\",\"dweb:/ipfs/QmPJbHU5TAjHqUTZzAcicEeG2nknmwCN43L4EW9LHbknTN\"]},\"contracts/samples/HybridAccount.sol\":{\"keccak256\":\"0x5f1ed358cca02bdfcacf308e13e788360374e6309da6f8b2e37b7ce937f744b2\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://6e78131bbc602b5e1dcbcbdfe5412b7bbcaf4eaf9dc44ef6665c5e8ffafae8d5\",\"dweb:/ipfs/QmeCeDaXa54ecEDZKVDndmZnxu8GRkLxFoiKzFXTAC1U6q\"]},\"contracts/samples/callback/TokenCallbackHandler.sol\":{\"keccak256\":\"0xfff3df5f5211d71158bb017ff791dc4fa85db53890f7bd72bac3a43d89e83752\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8f91c2d9845513fc88bf73efecd4907d9895b6f9fbe1d6fca09c4d3ad2d787f3\",\"dweb:/ipfs/QmQAFiKpqjVjWrm538tVEYuZvML6iNxNkQAy4UzchJEcpB\"]},\"lib/forge-std/src/console.sol\":{\"keccak256\":\"0xf61cb43a94d8318049d0a7f567af8c0aa952b5762a43851b130b90b3fcde0c6a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://53a52c6c3aeb22f7a18f53fca16af590308a8e3e5507e74df9b8e2561c932194\",\"dweb:/ipfs/QmaaXuY8mC66YoE2xyZdWuLHXqAxLjbnNxiofx8BTP1MRn\"]},\"node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e8fa670c3bdce78e642cc6ae11c4cb38b133499cdce5e1990a9979d424703263\",\"dweb:/ipfs/QmVxeCUk4jL2pXQyhsoNJwyU874wRufS2WvGe8TgPKPqhE\"]},\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://383fb7b8181016ac5ccf07bc9cdb7c1b5045ea36e2cc4df52bcbf20396fc7688\",\"dweb:/ipfs/QmYJ7Cg4WmE3rR8KGQxjUCXFfTH6TcwZ2Z1f6tPrq7jHFr\"]},\"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2db8e18505e86e02526847005d7287a33e397ed7fb9eaba3fd4a4a197add16e2\",\"dweb:/ipfs/QmW9BSuKTzHWHBNSHF4L8XfVuU1uJrP2vLg84YtBd8mL82\"]},\"node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"node_modules/@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x3d6069be9b4c01fb81840fb9c2c4dc58dd6a6a4aafaa2c6837de8699574d84c6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://720d6bb56ea0c4ef781c0bd65c5bd0541f5a46100163b2587170f97658d2deed\",\"dweb:/ipfs/QmTS2biLVPrv8CeeXCaKmkFxonMiRvc1LxiYBRYDAJHQUS\"]},\"node_modules/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol\":{\"keccak256\":\"0xc6619957bcc6641fe8984bfaf9ff11a9e4b97d8149c0495f608f9a2416d7c5cf\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://543be67f7fa43b1b932637c1c7f12035f0f4b0f7ee2bd3c33841186f79c165c1\",\"dweb:/ipfs/QmSBPM2UVKbmJqWfD9i6hSiqbaE8TV4TSqfuiivziRRLKM\"]},\"node_modules/@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0e28648f994abf1d6bc345644a361cc0b7efa544f8bc0c8ec26011fed85a91ec\",\"dweb:/ipfs/QmVVE7AiRjKaQYYji7TkjmTeVzGpNmms5eoxqTCfvvpj6D\"]},\"node_modules/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e75cf83beb757b8855791088546b8337e9d4684e169400c20d44a515353b708\",\"dweb:/ipfs/QmYvPafLfoquiDMEj7CKHtvbgHu7TJNPSVPSCjrtjV8HjV\"]},\"node_modules/@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol\":{\"keccak256\":\"0x1a5d61db2733202ba361e6d6741cd2e662380e22b80e987eacfc91973f2267dc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://04c0cd697050a6516b7779aa2343ad2d0e5217d8915ac2382681dfdf4e445be3\",\"dweb:/ipfs/QmPCBCZgm7pHBwwogE2F9NCN3UfTdLNhqc8UDEvw8kDzyA\"]},\"node_modules/@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2455248c8ddd9cc6a7af76a13973cddf222072427e7b0e2a7d1aff345145e931\",\"dweb:/ipfs/QmfYjnjRbWqYpuxurqveE6HtzsY1Xx323J428AKQgtBJZm\"]},\"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e26daf81e2252dc1fe1ce0e4b55c2eb7c6d1ee84ae6558d1a9554432ea1d32da\",\"dweb:/ipfs/Qmb1UANWiWq5pCKbmHSu772hd4nt374dVaghGmwSVNuk8Q\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b81d9ff6559ea5c47fc573e17ece6d9ba5d6839e213e6ebc3b4c5c8fe4199d7f\",\"dweb:/ipfs/QmPCW1bFisUzJkyjroY3yipwfism9RRCigCcK1hbXtVM8n\"]},\"node_modules/@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8b93a1e39a4a19eba1600b92c96f435442db88cac91e315c8291547a2a7bcfe2\",\"dweb:/ipfs/QmTm34KVe6uZBZwq8dZDNWwPcm24qBJdxqL3rPxBJ4LrMv\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c50fcc459e49a9858b6d8ad5f911295cb7c9ab57567845a250bf0153f84a95c7\",\"dweb:/ipfs/QmcEW85JRzvDkQggxiBBLVAasXWdkhEysqypj9EaB6H2g6\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.25+commit.b61c2a91"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address payable","name":"_helperAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"token","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"fetchPrice"},{"inputs":[{"internalType":"string","name":"token","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"getTest"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokenPrices","outputs":[{"internalType":"string","name":"price","type":"string"},{"internalType":"uint256","name":"timestamp","type":"uint256"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/","eth-gas-reporter/=node_modules/eth-gas-reporter/","forge-std/=lib/forge-std/src/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"contracts/TokenPrice.sol":"TokenPrice"},"evmVersion":"paris","libraries":{}},"sources":{"contracts/TokenPrice.sol":{"keccak256":"0x8c5fadd42f185e592c9b7d7940ddd005ef82d604051335ba887692f31d800b84","urls":["bzz-raw://db22302503b154aa03e5a08a1380d58092c419641349c05534569a80fad260ff","dweb:/ipfs/QmP2acLJiLxMhUjdPjRxEzo7yLt16CPcdLdFRSykuUvbqW"],"license":"GPL-3.0"},"contracts/core/BaseAccount.sol":{"keccak256":"0x5eb3253b32fd8ba8ae7b9d83da8e9924254a4d3d17a8772b41280e8572974b3c","urls":["bzz-raw://b2d23d1276f85300e2ad0c7219614a072796b4f5581fd552b0bcaa47904400d3","dweb:/ipfs/QmVWK5WZ3VskNTfCBxLqY4xBP7WGm3cRM9Qhdy56f5TfAk"],"license":"GPL-3.0"},"contracts/core/Helpers.sol":{"keccak256":"0x591c87519f7155d1909210276b77925ab2722a99b7b5d5649aecc36ebbdb045a","urls":["bzz-raw://69643e83f68e6a13d5075c7565bfce326673b0bd98c432033c4603ea84835746","dweb:/ipfs/QmSwSzjYyV7qudi5vvsmzHMG2Z4YJZxX51RRXXVCLaNcEU"],"license":"GPL-3.0"},"contracts/interfaces/IAccount.sol":{"keccak256":"0x556a0e5980de18e90b115553ed502408155ba35f58642823010d9288047bc418","urls":["bzz-raw://a0f420134b79596db8737173c7b933ae0a33059e107b6327c43aa40d4744a9e4","dweb:/ipfs/QmRo8s1AhXmEMV7uPYnbpYwU19e9Bk6jmYBJTiPx3Fo85W"],"license":"GPL-3.0"},"contracts/interfaces/IAggregator.sol":{"keccak256":"0x060e9ddb0152250c269ba0640dc5753834ac44cf182a2837d508c0c529cae26a","urls":["bzz-raw://20ed837bc5909c89ff1910246bf245a5dad6840aa939382e1694964eb7dbd37b","dweb:/ipfs/QmTMybRq5yyghPDDs1ZCNAVB9sSJ4WHe6Q9mejuKPTAdNP"],"license":"GPL-3.0"},"contracts/interfaces/IEntryPoint.sol":{"keccak256":"0x3a90bf308819ed125fa4202f880999caff8a8686633b8ddb79a30ca240d5b8f8","urls":["bzz-raw://d2d21cc92c2fdab2b58d21bc25d4cd0e8c284b922528a186b087b818d54bc6cf","dweb:/ipfs/QmT1qrfuBjsv2rmRCDn8mgPXHp94hARJwzbcDuBLDTbFWd"],"license":"GPL-3.0"},"contracts/interfaces/INonceManager.sol":{"keccak256":"0x509871e6c63663cdcc3eba19920fe84e991f38b289b1377ac3c3a6d9f22d7e12","urls":["bzz-raw://00fe21b4349b24c50df60e1a705179293982bd9e7a32b78d4bac9620f89e7fe2","dweb:/ipfs/QmSFFYGfUwQbVa6hASjU7YxTvgi2HkfrPr4X5oPHscHg8b"],"license":"GPL-3.0"},"contracts/interfaces/IStakeManager.sol":{"keccak256":"0xd227b02888cd4ac68daebcdfd992ec00f9fff66fa3b3bb16f656cd582fa3480f","urls":["bzz-raw://b389da4714a138be63704a576a482505eab2855e263b38a93706395d8d42e7c3","dweb:/ipfs/QmeeAZpdHwUXxqP8pxA7GNtoCGBmmH4FaqLLwScVKGxtxZ"],"license":"GPL-3.0-only"},"contracts/interfaces/UserOperation.sol":{"keccak256":"0x61374003361059087fdcf17967a7bba052badeaf5c7f0ae689166f8aafd3a45c","urls":["bzz-raw://6ff83c59432e733bf6304dda27cd4b0f34401917dd535e2669cc842d2d26568c","dweb:/ipfs/QmPJbHU5TAjHqUTZzAcicEeG2nknmwCN43L4EW9LHbknTN"],"license":"GPL-3.0"},"contracts/samples/HybridAccount.sol":{"keccak256":"0x5f1ed358cca02bdfcacf308e13e788360374e6309da6f8b2e37b7ce937f744b2","urls":["bzz-raw://6e78131bbc602b5e1dcbcbdfe5412b7bbcaf4eaf9dc44ef6665c5e8ffafae8d5","dweb:/ipfs/QmeCeDaXa54ecEDZKVDndmZnxu8GRkLxFoiKzFXTAC1U6q"],"license":"GPL-3.0"},"contracts/samples/callback/TokenCallbackHandler.sol":{"keccak256":"0xfff3df5f5211d71158bb017ff791dc4fa85db53890f7bd72bac3a43d89e83752","urls":["bzz-raw://8f91c2d9845513fc88bf73efecd4907d9895b6f9fbe1d6fca09c4d3ad2d787f3","dweb:/ipfs/QmQAFiKpqjVjWrm538tVEYuZvML6iNxNkQAy4UzchJEcpB"],"license":"GPL-3.0"},"lib/forge-std/src/console.sol":{"keccak256":"0xf61cb43a94d8318049d0a7f567af8c0aa952b5762a43851b130b90b3fcde0c6a","urls":["bzz-raw://53a52c6c3aeb22f7a18f53fca16af590308a8e3e5507e74df9b8e2561c932194","dweb:/ipfs/QmaaXuY8mC66YoE2xyZdWuLHXqAxLjbnNxiofx8BTP1MRn"],"license":"MIT"},"node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol":{"keccak256":"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90","urls":["bzz-raw://e8fa670c3bdce78e642cc6ae11c4cb38b133499cdce5e1990a9979d424703263","dweb:/ipfs/QmVxeCUk4jL2pXQyhsoNJwyU874wRufS2WvGe8TgPKPqhE"],"license":"MIT"},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol":{"keccak256":"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff","urls":["bzz-raw://383fb7b8181016ac5ccf07bc9cdb7c1b5045ea36e2cc4df52bcbf20396fc7688","dweb:/ipfs/QmYJ7Cg4WmE3rR8KGQxjUCXFfTH6TcwZ2Z1f6tPrq7jHFr"],"license":"MIT"},"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol":{"keccak256":"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2","urls":["bzz-raw://2db8e18505e86e02526847005d7287a33e397ed7fb9eaba3fd4a4a197add16e2","dweb:/ipfs/QmW9BSuKTzHWHBNSHF4L8XfVuU1uJrP2vLg84YtBd8mL82"],"license":"MIT"},"node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol":{"keccak256":"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61","urls":["bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354","dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce"],"license":"MIT"},"node_modules/@openzeppelin/contracts/proxy/utils/Initializable.sol":{"keccak256":"0x3d6069be9b4c01fb81840fb9c2c4dc58dd6a6a4aafaa2c6837de8699574d84c6","urls":["bzz-raw://720d6bb56ea0c4ef781c0bd65c5bd0541f5a46100163b2587170f97658d2deed","dweb:/ipfs/QmTS2biLVPrv8CeeXCaKmkFxonMiRvc1LxiYBRYDAJHQUS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol":{"keccak256":"0xc6619957bcc6641fe8984bfaf9ff11a9e4b97d8149c0495f608f9a2416d7c5cf","urls":["bzz-raw://543be67f7fa43b1b932637c1c7f12035f0f4b0f7ee2bd3c33841186f79c165c1","dweb:/ipfs/QmSBPM2UVKbmJqWfD9i6hSiqbaE8TV4TSqfuiivziRRLKM"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol":{"keccak256":"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b","urls":["bzz-raw://0e28648f994abf1d6bc345644a361cc0b7efa544f8bc0c8ec26011fed85a91ec","dweb:/ipfs/QmVVE7AiRjKaQYYji7TkjmTeVzGpNmms5eoxqTCfvvpj6D"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol":{"keccak256":"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da","urls":["bzz-raw://6e75cf83beb757b8855791088546b8337e9d4684e169400c20d44a515353b708","dweb:/ipfs/QmYvPafLfoquiDMEj7CKHtvbgHu7TJNPSVPSCjrtjV8HjV"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol":{"keccak256":"0x1a5d61db2733202ba361e6d6741cd2e662380e22b80e987eacfc91973f2267dc","urls":["bzz-raw://04c0cd697050a6516b7779aa2343ad2d0e5217d8915ac2382681dfdf4e445be3","dweb:/ipfs/QmPCBCZgm7pHBwwogE2F9NCN3UfTdLNhqc8UDEvw8kDzyA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Address.sol":{"keccak256":"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa","urls":["bzz-raw://2455248c8ddd9cc6a7af76a13973cddf222072427e7b0e2a7d1aff345145e931","dweb:/ipfs/QmfYjnjRbWqYpuxurqveE6HtzsY1Xx323J428AKQgtBJZm"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol":{"keccak256":"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899","urls":["bzz-raw://e26daf81e2252dc1fe1ce0e4b55c2eb7c6d1ee84ae6558d1a9554432ea1d32da","dweb:/ipfs/Qmb1UANWiWq5pCKbmHSu772hd4nt374dVaghGmwSVNuk8Q"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0","urls":["bzz-raw://b81d9ff6559ea5c47fc573e17ece6d9ba5d6839e213e6ebc3b4c5c8fe4199d7f","dweb:/ipfs/QmPCW1bFisUzJkyjroY3yipwfism9RRCigCcK1hbXtVM8n"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/cryptography/ECDSA.sol":{"keccak256":"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58","urls":["bzz-raw://8b93a1e39a4a19eba1600b92c96f435442db88cac91e315c8291547a2a7bcfe2","dweb:/ipfs/QmTm34KVe6uZBZwq8dZDNWwPcm24qBJdxqL3rPxBJ4LrMv"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1","urls":["bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f","dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3","urls":["bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c","dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc","urls":["bzz-raw://c50fcc459e49a9858b6d8ad5f911295cb7c9ab57567845a250bf0153f84a95c7","dweb:/ipfs/QmcEW85JRzvDkQggxiBBLVAasXWdkhEysqypj9EaB6H2g6"],"license":"MIT"}},"version":1},"id":1} \ No newline at end of file diff --git a/frontend/src/abi/your-contract.abi.json b/frontend/src/abi/your-contract.abi.json deleted file mode 100644 index 7173347..0000000 --- a/frontend/src/abi/your-contract.abi.json +++ /dev/null @@ -1,63 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "_helperAddr", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "fetchPrice", - "inputs": [ - { - "name": "token", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getTest", - "inputs": [ - { - "name": "token", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "tokenPrices", - "inputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "outputs": [ - { - "name": "price", - "type": "string", - "internalType": "string" - }, - { - "name": "timestamp", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - } -] \ No newline at end of file diff --git a/frontend/src/components/TokenPriceFetcher.tsx b/frontend/src/components/TokenPriceFetcher.tsx index 3764375..8f30672 100644 --- a/frontend/src/components/TokenPriceFetcher.tsx +++ b/frontend/src/components/TokenPriceFetcher.tsx @@ -1,208 +1,208 @@ -import { useContext, useState } from "react"; -import { Button } from "./ui/button"; -import { defaultSnapOrigin } from "@/config"; -import { MetaMaskContext } from "@/context/MetamaskContext"; -import { concat, ethers, FunctionFragment, Wallet } from "ethers"; -import { AbiCoder } from "ethers"; -import { hexlify } from "ethers"; -import { CopyIcon } from "./CopyIcon"; -import { YOUR_CONTRACT } from "@/config/snap"; -import { useContractAbi } from "@/hooks/useContractAbi"; -import { Loader2 } from "lucide-react"; +import {useContext, useState} from "react"; +import {Button} from "./ui/button"; +import {defaultSnapOrigin} from "@/config"; +import {MetaMaskContext} from "@/context/MetamaskContext"; +import {concat, ethers, FunctionFragment, Wallet} from "ethers"; +import {AbiCoder} from "ethers"; +import {hexlify} from "ethers"; +import {CopyIcon} from "./CopyIcon"; +import {YOUR_CONTRACT} from "@/config/snap"; +import {useContractAbi} from "@/hooks/useContractAbi"; +import {Loader2} from "lucide-react"; const FormComponent = () => { - const [state] = useContext(MetaMaskContext); - const [contractAddress, setContractAddress] = useState(YOUR_CONTRACT); - const [tokenSymbol, setTokenSymbol] = useState(""); - const [inputSymbol, setInputSymbol] = useState(""); - const [tokenPrice, setTokenPrice] = useState(""); - const { abi: contractAbi } = useContractAbi("TokenPrice"); - const [txResponse, setTxResponse] = useState(null); - - const [isLoading, setIsLoading] = useState(false); - const [error, setError] = useState(null); - - const abiCoder = new AbiCoder(); - - const onSubmit = async () => { - try { - if (!state.selectedAcount || Number(state.chain) !== 28882) { - return; - } - setIsLoading(true); - setTokenPrice(""); - setTxResponse(""); - setError(""); - setTokenSymbol(inputSymbol); - - // Prepare the function selector and encoded parameters for the smart contract interaction. - // This specifies which function to call on the contract and with what arguments - const funcSelector = FunctionFragment.getSelector("fetchPrice", [ - "string", - ]); - - // Here, we encode the tokenSymbol as a string. - const encodedParams = abiCoder.encode(["string"], [tokenSymbol]); - - // Convert the concatenated data to a hex-string. - const txData = hexlify(concat([funcSelector, encodedParams])); - - const transactionDetails = { - payload: { - // The contract we want to call. - to: import.meta.env.VITE_SMART_CONTRACT, - value: "0", - // Contains data such as which function and what arguments. - data: txData, - }, - account: state.selectedAcount.id, - scope: `eip155:${state.chain}`, - }; - - // Send request to RPC via our wallet. - const txResponse = await window.ethereum?.request({ - method: "wallet_invokeSnap", - params: { - snapId: defaultSnapOrigin, - request: { - method: "eth_sendUserOpBoba", - params: [transactionDetails], - id: state.selectedAcount.id, - }, - }, - }); - - console.log("txResponse:", txResponse); - setTxResponse(txResponse); - - const provider = new ethers.JsonRpcProvider( - import.meta.env.VITE_RPC_PROVIDER - ); - - const wallet = new Wallet(import.meta.env.VITE_PRIVATE_KEY, provider); - - const contract = new ethers.Contract( - contractAddress, - contractAbi, - wallet - ); - - // Fetch token-price from the struct inside the smart-contract. - const price = await contract.tokenPrices(tokenSymbol); - const price2 = price[0] || price["0"]; // Assuming the first property is the price string - - console.log("fetched price: ", price); - setTokenPrice(price2); - } catch (error: any) { - console.log(`error`, error); - setError(error.message); - } finally { - setIsLoading(false); - } - }; - - return ( -
-
-
- -
- setContractAddress(e.target.value)} - name="input contract" - className="block w-full bg-teal-200 rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" - placeholder="0x" - /> -
- -
- setInputSymbol(e.target.value)} - name="input token symbol" - className="block w-full bg-teal-200 rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" - placeholder="ETH" - /> -
-
-
-
-
- -
-
- {error && ( -
-
-

Opps, something went wrong!

-
-
{ - await navigator.clipboard.writeText(error); - }} - > -
- {JSON.stringify(error, null, 2)} + const [state] = useContext(MetaMaskContext); + const [contractAddress, setContractAddress] = useState(YOUR_CONTRACT); + const [tokenSymbol, setTokenSymbol] = useState(""); + const [inputSymbol, setInputSymbol] = useState("ETH"); + const [tokenPrice, setTokenPrice] = useState(""); + const {abi: contractAbi} = useContractAbi("TokenPrice"); + const [txResponse, setTxResponse] = useState(null); + + const [isLoading, setIsLoading] = useState(false); + const [error, setError] = useState(null); + + const abiCoder = new AbiCoder(); + + const onSubmit = async () => { + try { + if (!state.selectedAcount || Number(state.chain) !== 28882) { + return; + } + setIsLoading(true); + setTokenPrice(""); + setTxResponse(""); + setError(""); + setTokenSymbol(inputSymbol); + + // Prepare the function selector and encoded parameters for the smart contract interaction. + // This specifies which function to call on the contract and with what arguments + const funcSelector = FunctionFragment.getSelector("fetchPrice", [ + "string", + ]); + + // Here, we encode the tokenSymbol as a string. + const encodedParams = abiCoder.encode(["string"], [tokenSymbol]); + + // Convert the concatenated data to a hex-string. + const txData = hexlify(concat([funcSelector, encodedParams])); + + const transactionDetails = { + payload: { + // The contract we want to call. + to: import.meta.env.VITE_SMART_CONTRACT, + value: "0", + // Contains data such as which function and what arguments. + data: txData, + }, + account: state.selectedAcount.id, + scope: `eip155:${state.chain}`, + }; + + // Send request to RPC via our wallet. + const txResponse = await window.ethereum?.request({ + method: "wallet_invokeSnap", + params: { + snapId: defaultSnapOrigin, + request: { + method: "eth_sendUserOpBoba", + params: [transactionDetails], + id: state.selectedAcount.id, + }, + }, + }); + + console.log("txResponse:", txResponse); + setTxResponse(txResponse); + + const provider = new ethers.JsonRpcProvider( + import.meta.env.VITE_RPC_PROVIDER + ); + + const contract = new ethers.Contract( + contractAddress, + contractAbi, + provider, + ); + + // Fetch token-price from the struct inside the smart-contract. + const price = await contract.tokenPrices(tokenSymbol); + const price2 = price[0] || price["0"]; // Assuming the first property is the price string + + console.log("fetched price: ", price); + setTokenPrice(price2); + } catch (error: any) { + console.log(`error`, error); + setError(error.message); + } finally { + setIsLoading(false); + } + }; + + return ( +
+
+
+ +
+ setContractAddress(e.target.value)} + name="input contract" + className="block w-full bg-teal-200 rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" + placeholder="0x" + /> +
+ +
+ setInputSymbol(e.target.value)} + name="input token symbol" + className="block w-full bg-teal-200 rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" + placeholder="ETH" + /> +
+
-
- +
+
+ +
-
-
- )} - {tokenPrice && !error && ( -
-
-

- Price for{" "} - + {error && ( +

+
+

Opps, something went wrong!

+
+
{ + await navigator.clipboard.writeText(error); + }} + > +
+ {JSON.stringify(error, null, 2)} +
+
+ +
+
+
+ )} + {tokenPrice && !error && ( +
+
+

+ Price for{" "} + {tokenSymbol} {" "} - is:{" "} - + is:{" "} + ${parseFloat(tokenPrice).toLocaleString()} -

-
-
{ - await navigator.clipboard.writeText(txResponse); - }} - > -
- {JSON.stringify(txResponse, null, 2)} -
-
- -
-
+

+
+
{ + await navigator.clipboard.writeText(txResponse); + }} + > +
+ {JSON.stringify(txResponse, null, 2)} +
+
+ +
+
+
+ )}
- )} -
- ); + ); }; export default FormComponent; diff --git a/frontend/src/hooks/useContractAbi.ts b/frontend/src/hooks/useContractAbi.ts index ae03c19..ac55428 100644 --- a/frontend/src/hooks/useContractAbi.ts +++ b/frontend/src/hooks/useContractAbi.ts @@ -14,7 +14,7 @@ export function useContractAbi(contract: "TokenPrice") { useEffect(() => { const fetchAbi = async () => { try { - const response = await fetch(`/src/abi/${contract}.json`); + const response = await fetch(`/abi/${contract}.json`); if (!response.ok) { throw new Error("Network response was not ok"); } diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts index d7b46e5..c5f9e11 100644 --- a/frontend/src/vite-env.d.ts +++ b/frontend/src/vite-env.d.ts @@ -9,7 +9,6 @@ declare global { readonly env: ImportMetaEnv; } interface ImportMetaEnv { - readonly VITE_PRIVATE_KEY: string; readonly VITE_CLIENT_ADDR: string; readonly VITE_SMART_CONTRACT: string; readonly VITE_ENTRY_POINT: string;