Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified and rearranged the paymasterAPI test cases. #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 12 additions & 67 deletions package.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions test/data/apiTestData.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
"mumbai_chainid": 80001,
"goerli_chainid": 5,
"arka_deposit": "https://arka.etherspot.io/deposit",
"arka_deposit_v2": "https://arka.etherspot.io/deposit/v2",
"arka_whitelist": "https://arka.etherspot.io/whitelist",
"arka_whitelist_v2": "https://arka.etherspot.io/whitelist/v2",
"arka_checkwhitelist": "https://arka.etherspot.io/checkWhitelist",
"arka_checkwhitelist_v2": "https://arka.etherspot.io/checkWhitelist/v2",
"arka_pimlico": "https://arka.etherspot.io/pimlicoAddress",
"address": "0x684E10D67dc4159B813Db70a1DAeB5FcC98bd034",
"entryPointAddress": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
Expand Down
25 changes: 24 additions & 1 deletion test/data/constant.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
"add_whitelist_3": "Successfully whitelisted with transaction Hash",
"check_whitelist_1": "Already added",
"check_whitelist_2": "Not added yet",
"getAllWhitelist_1": "No whitelist were found on the given apiKey/policyId",
"deposit_1": "Successfully deposited",
"deposit_2": "Successfully deposited with transaction Hash",
"deposit_3": "Balance is less than the amount to be deposited",

"invalid_network_1": "Invalid network/token",
"invalid_network_2": "could not detect network",
Expand All @@ -55,5 +58,25 @@

"invalid_apiKey": "Invalid Api Key",
"invalid_data": "Invalid data provided",
"unsupported_chainid": "Unsupported chain id, visit https://etherspot.fyi for more information"
"unsupported_chainid": "Unsupported chain id, visit https://etherspot.fyi for more information",

"sponsorshipPolicy_walletAddress_1": "Wallet address does not match for the Api Key",
"sponsorshipPolicy_walletAddress_2": "Invalid sponsorship policy data",
"sponsorshipPolicy_walletAddress_3": "Name and description are required fields",
"sponsorshipPolicy_walletAddress_4": "Supported entry point versions are required and must be valid. You entered: none. Valid values are: EPV_06, EPV_07",
"sponsorshipPolicy_walletAddress_5": "Supported entry point versions are required and must be valid. You entered: EPV_06, EP_07. Valid values are: EPV_06, EPV_07",
"sponsorshipPolicy_walletAddress_6": "Sponsorship policy not found",
"sponsorshipPolicy_walletAddress_7": "Invalid sponsorship policy id",
"sponsorshipPolicy_walletAddress_8": "Route PUT:/enable-policy not found",
"sponsorshipPolicy_walletAddress_9": "Not Found",
"sponsorshipPolicy_walletAddress_10": "Failed to update sponsorship policy",
"sponsorshipPolicy_walletAddress_11": "Unsupported EP version",
"sponsorshipPolicy_walletAddress_12": "Invalid URL",
"sponsorshipPolicy_walletAddress_13": "Api Key is required in header",
"sponsorshipPolicy_walletAddress_14": "Cannot disable a policy which is already disabled",
"sponsorshipPolicy_walletAddress_15": "Cannot enable a policy which is already enabled",

"successCode_1": 200,
"skandha_error_1": "Invalid Request",
"skandha_error_2": "Unexpected behaviour"
}
834 changes: 833 additions & 1 deletion test/data/messages.json

Large diffs are not rendered by default.

63 changes: 59 additions & 4 deletions test/data/testData.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"nft_tokenAddress": "0xe55C5793a52AF819fBf3e87a23B36708E6FDd2Cc",
"entryPointAddress": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
"invalidEntryPointAddress": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d278",
"incorrectentryPointAddress": "0x5a3132D4b0FDCD49acA30c7CF57a578a026d2719",
"zerodev_address": "0x50Dd0c06cB35D015446a82D13F7451E43ff8769d",
"simpleaccount_address": "0x9cD261Fa42287c7E24aBe62e6AAe165949628246",
"paymasterAddress": "0xEc43912D8C772A0Eba5a27ea5804Ba14ab502009",
Expand Down Expand Up @@ -138,12 +139,66 @@
"recipient3": "0xeD1098F954CC08936e4888Eb3EBAAcA6f15bD061",
"recipient4": "0x81a13A210717b765C5733aD70D81deC1DF1834dd",
"recipient5": "0xE05FB316eB8C4ba7288D43c1bd87BE8a8d16761C",
"txCount": 50,
"transactionHash": "0x639d74d9a681f19bc3a32ae4b5ee4b2562cec8458508babe0ac727d96b153360",
"invalid_transactionHash": "0x639d74d9a681f19bc3a32ae4b5ee4b2562cec8458508babe0ac727d96b15336",
"incorrect_transactionHash": "0x639d24d9a682f19bc3a32a14b5ee4b2562cec8458508ba1e0ac727d96b153160",
"arka_fqdn": "https://arka-qa.etherspot.io",
"arka_addPolicy": "add-policy",
"arka_updatePolicy": "update-policy",
"arka_deletePolicy": "delete-policy",
"arka_enablePolicy": "enable-policy",
"arka_disablePolicy": "disable-policy",
"arka_policy": "policy",
"arka_policyWalletAddress": "policy/wallet-address",
"globalMaximumUsd": "6000.0000",
"globalMaximumNative": "2000.000000000000000000",
"globalMaximumOpCount": 2000,
"perUserMaximumApplicable": true,
"perUserMaximumUsd": "200.0000",
"perUserMaximumNative": "300.000000000000000000",
"perUserMaximumOpCount": 60,
"perOpMaximumApplicable": true,
"perOpMaximumUsd": "20.0000",
"perOpMaximumNative": "30.000000000000000000",
"sponsorAddress": "0x684E10D67dc4159B813Db70a1DAeB5FcC98bd034",
"invalid_sponsorAddress": "0x684E10D67dc4159B813Db70a1DAeB5FcC98bd03",
"incorrect_sponsorAddress": "0x684D10D67dc4159C813Db70a1DAeB5FaC98bd035",
"arka_deposit": "https://arka.etherspot.io/deposit",
"arka_deposit_invalid": "http://arka.etherspot.io/deposit",
"arka_deposit_incorrect": "https://arka.etherspot.io/depos",
"arka_deposit_v2": "https://arka.etherspot.io/deposit/v2",
"arka_deposit_v2_invalid": "http://arka.etherspot.io/deposit/v2",
"arka_deposit_v2_incorrect": "https://arka.etherspot.io/depos/v2",
"arka_whitelist": "https://arka.etherspot.io/whitelist",
"arka_whitelist_invalid": "http://arka.etherspot.io/whitelist",
"arka_whitelist_incorrect": "https://arka.etherspot.io/whist",
"arka_whitelist_v2": "https://arka.etherspot.io/whitelist/v2",
"arka_whitelist_v2_invalid": "http://arka.etherspot.io/whitelist/v2",
"arka_whitelist_v2_incorrect": "https://arka.etherspot.io/white/v2",
"arka_checkwhitelist": "https://arka.etherspot.io/checkWhitelist",
"arka_checkwhitelist_invalid": "http://arka.etherspot.io/checkWhitelist",
"arka_checkwhitelist_incorrect": "https://arka.etherspot.io/checkWhist",
"arka_checkwhitelist_v2": "https://arka.etherspot.io/checkWhitelist/v2",
"arka_checkwhitelist_v2_invalid": "http://arka.etherspot.io/checkWhitelist/v2",
"arka_checkwhitelist_v2_incorrect": "https://arka.etherspot.io/checkWhite/v2",
"arka_removeWhitelist": "https://arka.etherspot.io/removeWhitelist",
"arka_removeWhitelist_invalid": "http://arka.etherspot.io/removeWhitelist",
"arka_removeWhitelist_incorrect": "https://arka.etherspot.io/removeWhist",
"arka_removeWhitelist_v2": "https://arka.etherspot.io/removeWhitelist/v2",
"arka_removeWhitelist_v2_invalid": "http://arka.etherspot.io/removeWhitelist/v2",
"arka_removeWhitelist_v2_incorrect": "https://arka.etherspot.io/removeWhite/v2",
"arka_pimlico": "https://arka.etherspot.io/pimlicoAddress",
"txCount": 50,
"transactionHash": "0x639d74d9a681f19bc3a32ae4b5ee4b2562cec8458508babe0ac727d96b153360",
"invalid_transactionHash": "0x639d74d9a681f19bc3a32ae4b5ee4b2562cec8458508babe0ac727d96b15336",
"incorrect_transactionHash": "0x639d24d9a682f19bc3a32a14b5ee4b2562cec8458508ba1e0ac727d96b153160"
"arka_pimlico_invalid": "http://arka.etherspot.io/pimlicoAddress",
"arka_pimlico_incorrect": "https://arka.etherspot.io/pimlicoess",
"arka_getAllWhitelist_v2": "https://arka.etherspot.io/getAllWhitelist/v2",
"arka_getAllWhitelist_v2_invalid": "http://arka.etherspot.io/getAllWhitelist/v2",
"arka_getAllWhitelist_v2_incorrect": "https://arka.etherspot.io/getAllWhite/v2",
"arka_metadata": "https://arka.etherspot.io/metadata",
"arka_metadata_invalid": "http://arka.etherspot.io/metadata",
"arka_metadata_incorrect": "https://arka.etherspot.io/mata",
"address": "0xE4fAe3bEEeFEDAaC49548869fca6F180fd37CA40",
"blockCount": 15,
"invalid_hex": "1234567890",
"incorrect_hex": "0xC22cF2aA30A0181d6fE4B0B11aab238714Ba54f3"
}
Loading
Loading