@deeeed/metamask-harness 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/adapters/extension/artifact-runtime-state.cjs +138 -0
- package/adapters/extension/inject.mjs +2 -0
- package/adapters/extension/launch-browser.cjs +24 -0
- package/adapters/extension/live.sh +82 -12
- package/adapters/extension/readiness.mjs +77 -36
- package/adapters/extension/snapshot-dist.sh +88 -3
- package/adapters/extension/verify.sh +6 -2
- package/adapters/manifest.json +17 -1
- package/adapters/shared/log-tui.mjs +1 -1
- package/dist/adapters/extension/artifact-integrity.js +38 -0
- package/dist/adapters/extension/extension-id.js +23 -4
- package/dist/adapters/extension/release-artifact.js +386 -0
- package/dist/adapters/extension/runtime-decision.js +164 -20
- package/dist/adapters/extension/runtime.js +169 -3
- package/dist/adapters/mobile/provision.js +38 -3
- package/dist/adapters/mobile/release-artifact-state.js +124 -0
- package/dist/adapters/mobile/release-artifact.js +295 -0
- package/dist/adapters.js +78 -6
- package/dist/app-lifecycle.js +4 -3
- package/dist/command-contract.js +16 -0
- package/dist/commands/call.js +6 -2
- package/dist/commands/launch/extension.js +74 -9
- package/dist/commands/launch/index.js +3 -0
- package/dist/commands/launch/mobile.js +2 -0
- package/dist/commands/provision.js +2 -0
- package/dist/commands/run-engine.js +109 -14
- package/dist/commands/run.js +4 -2
- package/dist/commands/runtime-launch.js +178 -10
- package/dist/heal-bounds.js +1 -1
- package/dist/live-adapter-contract.js +3 -1
- package/dist/metamask-action-validation.js +47 -1
- package/dist/mm-harness-cli.js +31 -1
- package/dist/recipe-security.js +40 -0
- package/dist/run-diagnostics.js +1 -1
- package/dist/runner.js +3 -0
- package/docs/RELEASE-QA-CAPABILITY-MAP.md +125 -0
- package/library/actions/extension/assets/finish_send.mjs +128 -0
- package/library/actions/extension/assets/import_custom_token.mjs +227 -0
- package/library/actions/extension/assets/prepare_send.mjs +53 -0
- package/library/actions/extension/assets/read_details.mjs +57 -0
- package/library/actions/extension/assets/read_visible_state.mjs +50 -0
- package/library/actions/extension/assets/review_send.mjs +23 -0
- package/library/actions/extension/assets/select_network_scope.mjs +30 -0
- package/library/actions/extension/assets/send.mjs +104 -0
- package/library/actions/extension/assets/set_custom_gas.mjs +56 -0
- package/library/actions/extension/assets/set_token_visibility.mjs +129 -0
- package/library/actions/extension/assets/verify_sorting.mjs +89 -0
- package/library/actions/extension/networks/add_chainlist.mjs +94 -0
- package/library/actions/extension/networks/add_custom.mjs +123 -0
- package/library/actions/extension/networks/custom_network.mjs +103 -0
- package/library/actions/extension/networks/read_visible_state.mjs +50 -0
- package/library/actions/extension/networks/remove_custom.mjs +68 -0
- package/library/actions/extension/perps/close_orders.mjs +1 -0
- package/library/actions/extension/perps/close_visible_position.mjs +133 -0
- package/library/actions/extension/perps/compare_provider_market.mjs +109 -0
- package/library/actions/extension/perps/edit_margin.mjs +82 -0
- package/library/actions/extension/perps/open_balance_action.mjs +58 -0
- package/library/actions/extension/perps/open_position_action.mjs +80 -0
- package/library/actions/extension/perps/perps.mjs +196 -2
- package/library/actions/extension/perps/place_order.mjs +5 -2
- package/library/actions/extension/perps/read_eligibility.mjs +34 -0
- package/library/actions/extension/perps/read_funds_confirmation.mjs +69 -0
- package/library/actions/extension/perps/read_snapshot.mjs +470 -0
- package/library/actions/extension/perps/read_visible_state.mjs +98 -0
- package/library/actions/extension/perps/select_activity_filter.mjs +44 -0
- package/library/actions/extension/perps/select_market_filter.mjs +71 -0
- package/library/actions/extension/perps/set_market_favorite.mjs +47 -0
- package/library/actions/extension/perps/update_position_tpsl.mjs +106 -0
- package/library/actions/extension/platform/cdp.mjs +109 -3
- package/library/actions/extension/settings/set_basic_functionality.mjs +58 -0
- package/library/actions/extension/swap_bridge/read_visible_state.mjs +71 -0
- package/library/actions/extension/swap_bridge/select_assets.mjs +103 -0
- package/library/actions/extension/swap_bridge/set_amount.mjs +36 -0
- package/library/actions/extension/swap_bridge/set_max_amount.mjs +58 -0
- package/library/actions/extension/swap_bridge/set_slippage.mjs +121 -0
- package/library/actions/extension/swap_bridge/submit_transaction.mjs +363 -0
- package/library/actions/extension/ui/activate_and_observe.mjs +96 -0
- package/library/actions/extension/ui/navigate.mjs +264 -8
- package/library/actions/extension/wallet/ensure_unlocked.mjs +2 -6
- package/library/actions/extension/wallet/import.mjs +13 -46
- package/library/actions/extension/wallet/lock.mjs +35 -0
- package/library/actions/extension/wallet/secret-input.mjs +98 -0
- package/library/actions/extension/wallet/select_account.mjs +71 -7
- package/library/actions/mobile/assets/read_visible_state.mjs +37 -0
- package/library/actions/mobile/perps/read_visible_state.mjs +31 -0
- package/library/actions/mobile/platform/native-session-name.mjs +5 -0
- package/library/actions/mobile/platform/observe-ui.mjs +86 -2
- package/library/actions/mobile/swap_bridge/native-session.mjs +45 -0
- package/library/actions/mobile/swap_bridge/read_visible_state.mjs +31 -0
- package/library/actions/mobile/swap_bridge/select_assets.mjs +94 -0
- package/library/actions/mobile/swap_bridge/set_amount.mjs +73 -0
- package/library/actions/mobile/ui/native-navigation.mjs +265 -0
- package/library/actions/mobile/ui/navigate.mjs +10 -1
- package/library/actions/mobile/wallet/ensure_unlocked.mjs +17 -0
- package/library/actions/mobile/wallet/import.mjs +71 -2
- package/library/actions/mobile/wallet/native-ui.mjs +512 -0
- package/library/actions/mobile/wallet/read_state.mjs +16 -0
- package/library/actions/mobile/wallet/reset.mjs +17 -4
- package/library/actions/shared/assets/visible-state.mjs +176 -0
- package/library/actions/shared/networks/visible-state.mjs +70 -0
- package/library/actions/shared/perps/visible-state.mjs +354 -0
- package/library/actions/shared/swap-bridge/transaction.mjs +54 -0
- package/library/actions/shared/swap-bridge/visible-state.mjs +97 -0
- package/library/actions/shared/ui/locators.mjs +7 -0
- package/library/manifests/extension.action-manifest.json +1366 -184
- package/library/manifests/mobile.action-manifest.json +235 -1
- package/library/recipes/assets/release-custom-gas-send.recipe.json +88 -0
- package/library/recipes/assets/release-custom-network-token-persistence.recipe.json +106 -0
- package/library/recipes/assets/release-native-max-cancel.recipe.json +70 -0
- package/library/recipes/assets/release-native-max-send.recipe.json +78 -0
- package/library/recipes/assets/release-own-account-send.recipe.json +80 -0
- package/library/recipes/assets/release-token-address-import.recipe.json +47 -0
- package/library/recipes/assets/release-token-details.recipe.json +48 -0
- package/library/recipes/assets/release-token-hide-readd.recipe.json +55 -0
- package/library/recipes/assets/release-token-list.recipe.json +75 -0
- package/library/recipes/assets/release-token-persistence.recipe.json +73 -0
- package/library/recipes/assets/release-token-search-import.recipe.json +40 -0
- package/library/recipes/assets/release-token-sorting.recipe.json +29 -0
- package/library/recipes/extension/networks/release-balance-stability.recipe.json +51 -0
- package/library/recipes/extension/perps/release-live-limit-order.recipe.json +104 -0
- package/library/recipes/extension/perps/release-order-entry.recipe.json +155 -0
- package/library/recipes/extension/perps/release-order-validation.recipe.json +220 -0
- package/library/recipes/extension/runner/action-validation.recipe.json +12 -1
- package/library/recipes/perps/release-activity-filters.recipe.json +51 -0
- package/library/recipes/perps/release-funds-flows.recipe.json +76 -0
- package/library/recipes/perps/release-live-market-order.recipe.json +122 -0
- package/library/recipes/perps/release-market-details.recipe.json +83 -0
- package/library/recipes/perps/release-market-search.recipe.json +79 -0
- package/library/recipes/perps/release-watchlist.recipe.json +99 -0
- package/library/recipes/swap-bridge/release-custom-slippage.recipe.json +90 -0
- package/library/recipes/swap-bridge/release-live-max-swap.recipe.json +99 -0
- package/library/recipes/swap-bridge/release-live-swap.recipe.json +101 -0
- package/library/recipes/swap-bridge/release-max-quote.recipe.json +72 -0
- package/library/recipes/swap-bridge/release-quote.recipe.json +72 -0
- package/library/recipes/swap-bridge/release-surface.recipe.json +43 -0
- package/library/recipes/wallet/import.recipe.json +20 -1
- package/library/recipes/wallet/reset-import.recipe.json +20 -1
- package/package.json +6 -5
- package/scripts/validate-release-report.mjs +319 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Perps release market details",
|
|
4
|
+
"description": "Opens one live Perps market through visible UI and proves its price, change, statistics, and Long/Short controls without development-only bridges.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"market": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "ETH",
|
|
12
|
+
"description": "Perps market symbol to open and verify."
|
|
13
|
+
},
|
|
14
|
+
"timeout_ms": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"minimum": 1000,
|
|
17
|
+
"default": 45000
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"workflow": {
|
|
22
|
+
"entry": "open-perps",
|
|
23
|
+
"nodes": {
|
|
24
|
+
"open-perps": {
|
|
25
|
+
"action": "ui.navigate",
|
|
26
|
+
"page": "perps",
|
|
27
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
28
|
+
"intent": "Reset transient market-list state on the Perps home surface",
|
|
29
|
+
"next": "open-market-list"
|
|
30
|
+
},
|
|
31
|
+
"open-market-list": {
|
|
32
|
+
"action": "ui.navigate",
|
|
33
|
+
"page": "perps-market-list",
|
|
34
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
35
|
+
"intent": "Show the complete live Perps market selection",
|
|
36
|
+
"next": "assert-market-list"
|
|
37
|
+
},
|
|
38
|
+
"assert-market-list": {
|
|
39
|
+
"action": "metamask.perps.read_visible_state",
|
|
40
|
+
"surface": "market-list",
|
|
41
|
+
"market": "{{params.market}}",
|
|
42
|
+
"minimum_market_count": 2,
|
|
43
|
+
"require_features": ["market-list"],
|
|
44
|
+
"max_items": 100,
|
|
45
|
+
"intent": "Prove the requested market appears in a populated live market list",
|
|
46
|
+
"next": "open-market"
|
|
47
|
+
},
|
|
48
|
+
"open-market": {
|
|
49
|
+
"action": "ui.navigate",
|
|
50
|
+
"page": "perps-market",
|
|
51
|
+
"market": "{{params.market}}",
|
|
52
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
53
|
+
"intent": "Open the requested Perps market through visible product controls",
|
|
54
|
+
"next": "assert-market"
|
|
55
|
+
},
|
|
56
|
+
"assert-market": {
|
|
57
|
+
"action": "metamask.perps.read_visible_state",
|
|
58
|
+
"surface": "market-details",
|
|
59
|
+
"market": "{{params.market}}",
|
|
60
|
+
"require_features": [
|
|
61
|
+
"price",
|
|
62
|
+
"price-change",
|
|
63
|
+
"stats",
|
|
64
|
+
"long-short"
|
|
65
|
+
],
|
|
66
|
+
"max_items": 100,
|
|
67
|
+
"intent": "Prove the selected market, live pricing, statistics, and trade directions are visible",
|
|
68
|
+
"next": "capture-market"
|
|
69
|
+
},
|
|
70
|
+
"capture-market": {
|
|
71
|
+
"action": "ui.screenshot",
|
|
72
|
+
"path": "screenshots/perps-market-details.png",
|
|
73
|
+
"label": "Perps release market details",
|
|
74
|
+
"intent": "Preserve reviewer-visible proof of the selected live market",
|
|
75
|
+
"next": "done"
|
|
76
|
+
},
|
|
77
|
+
"done": {
|
|
78
|
+
"action": "end",
|
|
79
|
+
"status": "pass"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Perps release market search",
|
|
4
|
+
"description": "Searches the live Perps market list by product name through trusted keyboard input and proves the filtered result set without development-only bridges.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"query": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "Bitcoin"
|
|
12
|
+
},
|
|
13
|
+
"expected_market": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"default": "BTC"
|
|
16
|
+
},
|
|
17
|
+
"maximum_results": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"minimum": 1,
|
|
20
|
+
"default": 3
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"workflow": {
|
|
25
|
+
"entry": "open-perps",
|
|
26
|
+
"nodes": {
|
|
27
|
+
"open-perps": {
|
|
28
|
+
"action": "ui.navigate",
|
|
29
|
+
"page": "perps",
|
|
30
|
+
"intent": "Reset transient market-list state on the Perps home surface",
|
|
31
|
+
"next": "open-market-list"
|
|
32
|
+
},
|
|
33
|
+
"open-market-list": {
|
|
34
|
+
"action": "ui.navigate",
|
|
35
|
+
"page": "perps-market-list",
|
|
36
|
+
"intent": "Show the complete live Perps market selection",
|
|
37
|
+
"next": "assert-unfiltered"
|
|
38
|
+
},
|
|
39
|
+
"assert-unfiltered": {
|
|
40
|
+
"action": "metamask.perps.read_visible_state",
|
|
41
|
+
"surface": "market-list",
|
|
42
|
+
"minimum_market_count": 20,
|
|
43
|
+
"require_features": ["market-list"],
|
|
44
|
+
"max_items": 100,
|
|
45
|
+
"intent": "Prove the live market list is populated before filtering",
|
|
46
|
+
"next": "search"
|
|
47
|
+
},
|
|
48
|
+
"search": {
|
|
49
|
+
"action": "ui.set_input",
|
|
50
|
+
"test_id": "search-input",
|
|
51
|
+
"value": "{{params.query}}",
|
|
52
|
+
"intent": "Enter the market search through trusted keyboard input",
|
|
53
|
+
"next": "assert-filtered"
|
|
54
|
+
},
|
|
55
|
+
"assert-filtered": {
|
|
56
|
+
"action": "metamask.perps.read_visible_state",
|
|
57
|
+
"surface": "market-list",
|
|
58
|
+
"market": "{{params.expected_market}}",
|
|
59
|
+
"minimum_market_count": 1,
|
|
60
|
+
"maximum_market_count": "{{params.maximum_results}}",
|
|
61
|
+
"require_features": ["market-list"],
|
|
62
|
+
"max_items": 100,
|
|
63
|
+
"intent": "Prove the search reduced the list and retained the requested market",
|
|
64
|
+
"next": "capture"
|
|
65
|
+
},
|
|
66
|
+
"capture": {
|
|
67
|
+
"action": "ui.screenshot",
|
|
68
|
+
"path": "screenshots/perps-market-search.png",
|
|
69
|
+
"label": "Perps release market search",
|
|
70
|
+
"intent": "Preserve reviewer-visible proof of the filtered market list",
|
|
71
|
+
"next": "done"
|
|
72
|
+
},
|
|
73
|
+
"done": {
|
|
74
|
+
"action": "end",
|
|
75
|
+
"status": "pass"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Perps release watchlist persistence",
|
|
4
|
+
"description": "Adds and removes one live Perps market favorite and proves both states after navigating away and back.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"market": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "BTC"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"workflow": {
|
|
16
|
+
"entry": "open-perps",
|
|
17
|
+
"nodes": {
|
|
18
|
+
"open-perps": {
|
|
19
|
+
"action": "ui.navigate",
|
|
20
|
+
"page": "perps",
|
|
21
|
+
"intent": "Show the Perps home surface",
|
|
22
|
+
"next": "open-market-list"
|
|
23
|
+
},
|
|
24
|
+
"open-market-list": {
|
|
25
|
+
"action": "ui.navigate",
|
|
26
|
+
"page": "perps-market-list",
|
|
27
|
+
"intent": "Show the complete market list",
|
|
28
|
+
"next": "open-market"
|
|
29
|
+
},
|
|
30
|
+
"open-market": {
|
|
31
|
+
"action": "ui.navigate",
|
|
32
|
+
"page": "perps-market",
|
|
33
|
+
"market": "{{params.market}}",
|
|
34
|
+
"intent": "Open the market to update its favorite state",
|
|
35
|
+
"next": "add-favorite"
|
|
36
|
+
},
|
|
37
|
+
"add-favorite": {
|
|
38
|
+
"action": "metamask.perps.set_market_favorite",
|
|
39
|
+
"market": "{{params.market}}",
|
|
40
|
+
"favorite": true,
|
|
41
|
+
"intent": "Ensure the market is added to favorites",
|
|
42
|
+
"next": "return-home-added"
|
|
43
|
+
},
|
|
44
|
+
"return-home-added": {
|
|
45
|
+
"action": "ui.navigate",
|
|
46
|
+
"page": "perps",
|
|
47
|
+
"intent": "Show Perps home after adding the favorite",
|
|
48
|
+
"next": "assert-added"
|
|
49
|
+
},
|
|
50
|
+
"assert-added": {
|
|
51
|
+
"action": "metamask.perps.read_visible_state",
|
|
52
|
+
"surface": "home",
|
|
53
|
+
"market": "{{params.market}}",
|
|
54
|
+
"require_test_ids": ["perps-watchlist-{{params.market}}"],
|
|
55
|
+
"max_items": 150,
|
|
56
|
+
"intent": "Prove the favorite persists on the home watchlist",
|
|
57
|
+
"next": "reopen-market-list"
|
|
58
|
+
},
|
|
59
|
+
"reopen-market-list": {
|
|
60
|
+
"action": "ui.navigate",
|
|
61
|
+
"page": "perps-market-list",
|
|
62
|
+
"intent": "Reopen the complete market list",
|
|
63
|
+
"next": "reopen-market"
|
|
64
|
+
},
|
|
65
|
+
"reopen-market": {
|
|
66
|
+
"action": "ui.navigate",
|
|
67
|
+
"page": "perps-market",
|
|
68
|
+
"market": "{{params.market}}",
|
|
69
|
+
"intent": "Reopen the favorited market",
|
|
70
|
+
"next": "remove-favorite"
|
|
71
|
+
},
|
|
72
|
+
"remove-favorite": {
|
|
73
|
+
"action": "metamask.perps.set_market_favorite",
|
|
74
|
+
"market": "{{params.market}}",
|
|
75
|
+
"favorite": false,
|
|
76
|
+
"intent": "Ensure the market is removed from favorites",
|
|
77
|
+
"next": "return-home-removed"
|
|
78
|
+
},
|
|
79
|
+
"return-home-removed": {
|
|
80
|
+
"action": "ui.navigate",
|
|
81
|
+
"page": "perps",
|
|
82
|
+
"intent": "Show Perps home after removing the favorite",
|
|
83
|
+
"next": "assert-removed"
|
|
84
|
+
},
|
|
85
|
+
"assert-removed": {
|
|
86
|
+
"action": "metamask.perps.read_visible_state",
|
|
87
|
+
"surface": "home",
|
|
88
|
+
"forbid_test_ids": ["perps-watchlist-{{params.market}}"],
|
|
89
|
+
"max_items": 150,
|
|
90
|
+
"intent": "Prove the removed favorite no longer appears on the watchlist",
|
|
91
|
+
"next": "done"
|
|
92
|
+
},
|
|
93
|
+
"done": {
|
|
94
|
+
"action": "end",
|
|
95
|
+
"status": "pass"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Swap release custom slippage",
|
|
4
|
+
"description": "Selects a live Swap pair, obtains a quote, sets custom slippage, and proves the configured value through visible product UI.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"source_symbol": { "type": "string", "default": "ETH" },
|
|
10
|
+
"destination_symbol": { "type": "string", "default": "WETH" },
|
|
11
|
+
"source_chain": { "type": "string", "default": "eip155:1" },
|
|
12
|
+
"destination_chain": { "type": "string", "default": "eip155:1" },
|
|
13
|
+
"source_query": { "type": "string", "default": "ETH" },
|
|
14
|
+
"destination_query": { "type": "string", "default": "WETH" },
|
|
15
|
+
"source_asset_id": { "type": "string", "default": "" },
|
|
16
|
+
"destination_asset_id": { "type": "string", "default": "" },
|
|
17
|
+
"amount": { "type": "number", "minimum": 0.00000001, "default": 0.0001 },
|
|
18
|
+
"slippage": { "type": "number", "minimum": 0.01, "default": 3 },
|
|
19
|
+
"timeout_ms": { "type": "integer", "minimum": 1000, "default": 60000 }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"workflow": {
|
|
23
|
+
"entry": "open-swap",
|
|
24
|
+
"nodes": {
|
|
25
|
+
"open-swap": {
|
|
26
|
+
"action": "ui.navigate",
|
|
27
|
+
"page": "swap",
|
|
28
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
29
|
+
"intent": "Open Swap through visible product navigation",
|
|
30
|
+
"next": "select-assets"
|
|
31
|
+
},
|
|
32
|
+
"select-assets": {
|
|
33
|
+
"action": "metamask.swap_bridge.select_assets",
|
|
34
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
35
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
36
|
+
"source_chain": "{{params.source_chain}}",
|
|
37
|
+
"destination_chain": "{{params.destination_chain}}",
|
|
38
|
+
"source_query": "{{params.source_query}}",
|
|
39
|
+
"destination_query": "{{params.destination_query}}",
|
|
40
|
+
"source_asset_id": "{{params.source_asset_id}}",
|
|
41
|
+
"destination_asset_id": "{{params.destination_asset_id}}",
|
|
42
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
43
|
+
"intent": "Select the exact source and destination assets",
|
|
44
|
+
"next": "enter-amount"
|
|
45
|
+
},
|
|
46
|
+
"enter-amount": {
|
|
47
|
+
"action": "metamask.swap_bridge.set_amount",
|
|
48
|
+
"amount": "{{params.amount}}",
|
|
49
|
+
"wait_for_quote": true,
|
|
50
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
51
|
+
"intent": "Enter the capped amount and wait for a live quote",
|
|
52
|
+
"next": "set-slippage"
|
|
53
|
+
},
|
|
54
|
+
"set-slippage": {
|
|
55
|
+
"action": "metamask.swap_bridge.set_slippage",
|
|
56
|
+
"percent": "{{params.slippage}}",
|
|
57
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
58
|
+
"intent": "Set the checklist custom slippage value",
|
|
59
|
+
"next": "assert-quote"
|
|
60
|
+
},
|
|
61
|
+
"assert-quote": {
|
|
62
|
+
"action": "metamask.swap_bridge.read_visible_state",
|
|
63
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
64
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
65
|
+
"require_amount_inputs": true,
|
|
66
|
+
"require_settings": true,
|
|
67
|
+
"require_quote": true,
|
|
68
|
+
"expected_slippage": "{{params.slippage}}",
|
|
69
|
+
"intent": "Prove the live quote retains the custom slippage value",
|
|
70
|
+
"next": "wait-for-quote-display"
|
|
71
|
+
},
|
|
72
|
+
"wait-for-quote-display": {
|
|
73
|
+
"action": "ui.wait_for",
|
|
74
|
+
"test_id": "minimum-received",
|
|
75
|
+
"expected": "visible",
|
|
76
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
77
|
+
"intent": "Confirm the refreshed quote is visible",
|
|
78
|
+
"next": "capture-quote"
|
|
79
|
+
},
|
|
80
|
+
"capture-quote": {
|
|
81
|
+
"action": "ui.screenshot",
|
|
82
|
+
"path": "screenshots/swap-custom-slippage.png",
|
|
83
|
+
"label": "Swap custom slippage",
|
|
84
|
+
"intent": "Preserve reviewer-visible proof of the configured live quote",
|
|
85
|
+
"next": "done"
|
|
86
|
+
},
|
|
87
|
+
"done": { "action": "end", "status": "pass" }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Swap release live Max transaction",
|
|
4
|
+
"description": "Runs an explicitly authorized Max Swap through confirmed Activity and destination-balance proof.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"source_symbol": { "type": "string", "default": "USDC" },
|
|
10
|
+
"destination_symbol": { "type": "string", "default": "ETH" },
|
|
11
|
+
"source_chain": { "type": "string", "default": "eip155:1" },
|
|
12
|
+
"destination_chain": { "type": "string", "default": "eip155:1" },
|
|
13
|
+
"source_query": { "type": "string", "default": "USDC" },
|
|
14
|
+
"destination_query": { "type": "string", "default": "ETH" },
|
|
15
|
+
"source_asset_id": { "type": "string", "default": "" },
|
|
16
|
+
"destination_asset_id": { "type": "string", "default": "" },
|
|
17
|
+
"slippage": { "type": "number", "minimum": 0.01, "default": 3 },
|
|
18
|
+
"confirm_live": { "type": "boolean", "default": false },
|
|
19
|
+
"timeout_ms": { "type": "integer", "minimum": 1000, "default": 60000 },
|
|
20
|
+
"transaction_timeout_ms": { "type": "integer", "minimum": 1000, "default": 300000 }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"workflow": {
|
|
24
|
+
"entry": "open-swap",
|
|
25
|
+
"nodes": {
|
|
26
|
+
"open-swap": {
|
|
27
|
+
"action": "ui.navigate",
|
|
28
|
+
"page": "swap",
|
|
29
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
30
|
+
"intent": "Open Swap through visible product navigation",
|
|
31
|
+
"next": "select-assets"
|
|
32
|
+
},
|
|
33
|
+
"select-assets": {
|
|
34
|
+
"action": "metamask.swap_bridge.select_assets",
|
|
35
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
36
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
37
|
+
"source_chain": "{{params.source_chain}}",
|
|
38
|
+
"destination_chain": "{{params.destination_chain}}",
|
|
39
|
+
"source_query": "{{params.source_query}}",
|
|
40
|
+
"destination_query": "{{params.destination_query}}",
|
|
41
|
+
"source_asset_id": "{{params.source_asset_id}}",
|
|
42
|
+
"destination_asset_id": "{{params.destination_asset_id}}",
|
|
43
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
44
|
+
"intent": "Select the exact return pair",
|
|
45
|
+
"next": "use-max"
|
|
46
|
+
},
|
|
47
|
+
"use-max": {
|
|
48
|
+
"action": "metamask.swap_bridge.set_max_amount",
|
|
49
|
+
"wait_for_quote": true,
|
|
50
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
51
|
+
"intent": "Use the visible available token balance",
|
|
52
|
+
"next": "set-slippage"
|
|
53
|
+
},
|
|
54
|
+
"set-slippage": {
|
|
55
|
+
"action": "metamask.swap_bridge.set_slippage",
|
|
56
|
+
"percent": "{{params.slippage}}",
|
|
57
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
58
|
+
"intent": "Set the checklist custom slippage value",
|
|
59
|
+
"next": "assert-quote"
|
|
60
|
+
},
|
|
61
|
+
"assert-quote": {
|
|
62
|
+
"action": "metamask.swap_bridge.read_visible_state",
|
|
63
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
64
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
65
|
+
"require_amount_inputs": true,
|
|
66
|
+
"require_settings": true,
|
|
67
|
+
"require_quote": true,
|
|
68
|
+
"expected_slippage": "{{params.slippage}}",
|
|
69
|
+
"intent": "Prove the Max return quote and custom slippage",
|
|
70
|
+
"next": "capture-quote"
|
|
71
|
+
},
|
|
72
|
+
"capture-quote": {
|
|
73
|
+
"action": "ui.screenshot",
|
|
74
|
+
"path": "screenshots/swap-live-max-quote.png",
|
|
75
|
+
"label": "Authorized live Max Swap quote",
|
|
76
|
+
"intent": "Preserve the reviewed Max quote before submission",
|
|
77
|
+
"next": "submit-transaction"
|
|
78
|
+
},
|
|
79
|
+
"submit-transaction": {
|
|
80
|
+
"action": "metamask.swap_bridge.submit_transaction",
|
|
81
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
82
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
83
|
+
"amount": "visible",
|
|
84
|
+
"confirm_live": "{{params.confirm_live}}",
|
|
85
|
+
"timeout_ms": "{{params.transaction_timeout_ms}}",
|
|
86
|
+
"intent": "Submit the authorized Max Swap and prove confirmed Activity details",
|
|
87
|
+
"next": "capture-confirmed"
|
|
88
|
+
},
|
|
89
|
+
"capture-confirmed": {
|
|
90
|
+
"action": "ui.screenshot",
|
|
91
|
+
"path": "screenshots/swap-live-max-confirmed.png",
|
|
92
|
+
"label": "Confirmed live Max Swap",
|
|
93
|
+
"intent": "Preserve the confirmed destination balance evidence",
|
|
94
|
+
"next": "done"
|
|
95
|
+
},
|
|
96
|
+
"done": { "action": "end", "status": "pass" }
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Swap release live transaction",
|
|
4
|
+
"description": "Runs an explicitly authorized live Swap from pair selection through confirmed Activity and destination-balance proof.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"source_symbol": { "type": "string", "default": "ETH" },
|
|
10
|
+
"destination_symbol": { "type": "string", "default": "USDC" },
|
|
11
|
+
"source_chain": { "type": "string", "default": "eip155:1" },
|
|
12
|
+
"destination_chain": { "type": "string", "default": "eip155:1" },
|
|
13
|
+
"source_query": { "type": "string", "default": "ETH" },
|
|
14
|
+
"destination_query": { "type": "string", "default": "USDC" },
|
|
15
|
+
"source_asset_id": { "type": "string", "default": "" },
|
|
16
|
+
"destination_asset_id": { "type": "string", "default": "" },
|
|
17
|
+
"amount": { "type": "number", "minimum": 0.00000001, "default": 0.002 },
|
|
18
|
+
"slippage": { "type": "number", "minimum": 0.01, "default": 3 },
|
|
19
|
+
"confirm_live": { "type": "boolean", "default": false },
|
|
20
|
+
"timeout_ms": { "type": "integer", "minimum": 1000, "default": 60000 },
|
|
21
|
+
"transaction_timeout_ms": { "type": "integer", "minimum": 1000, "default": 300000 }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"workflow": {
|
|
25
|
+
"entry": "open-swap",
|
|
26
|
+
"nodes": {
|
|
27
|
+
"open-swap": {
|
|
28
|
+
"action": "ui.navigate",
|
|
29
|
+
"page": "swap",
|
|
30
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
31
|
+
"intent": "Open Swap through visible product navigation",
|
|
32
|
+
"next": "select-assets"
|
|
33
|
+
},
|
|
34
|
+
"select-assets": {
|
|
35
|
+
"action": "metamask.swap_bridge.select_assets",
|
|
36
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
37
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
38
|
+
"source_chain": "{{params.source_chain}}",
|
|
39
|
+
"destination_chain": "{{params.destination_chain}}",
|
|
40
|
+
"source_query": "{{params.source_query}}",
|
|
41
|
+
"destination_query": "{{params.destination_query}}",
|
|
42
|
+
"source_asset_id": "{{params.source_asset_id}}",
|
|
43
|
+
"destination_asset_id": "{{params.destination_asset_id}}",
|
|
44
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
45
|
+
"intent": "Select the exact source and destination assets",
|
|
46
|
+
"next": "enter-amount"
|
|
47
|
+
},
|
|
48
|
+
"enter-amount": {
|
|
49
|
+
"action": "metamask.swap_bridge.set_amount",
|
|
50
|
+
"amount": "{{params.amount}}",
|
|
51
|
+
"wait_for_quote": true,
|
|
52
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
53
|
+
"intent": "Enter the authorized live amount and wait for a quote",
|
|
54
|
+
"next": "set-slippage"
|
|
55
|
+
},
|
|
56
|
+
"set-slippage": {
|
|
57
|
+
"action": "metamask.swap_bridge.set_slippage",
|
|
58
|
+
"percent": "{{params.slippage}}",
|
|
59
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
60
|
+
"intent": "Set the checklist custom slippage value",
|
|
61
|
+
"next": "assert-quote"
|
|
62
|
+
},
|
|
63
|
+
"assert-quote": {
|
|
64
|
+
"action": "metamask.swap_bridge.read_visible_state",
|
|
65
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
66
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
67
|
+
"require_amount_inputs": true,
|
|
68
|
+
"require_settings": true,
|
|
69
|
+
"require_quote": true,
|
|
70
|
+
"expected_slippage": "{{params.slippage}}",
|
|
71
|
+
"intent": "Prove the authorized live quote and custom slippage",
|
|
72
|
+
"next": "capture-quote"
|
|
73
|
+
},
|
|
74
|
+
"capture-quote": {
|
|
75
|
+
"action": "ui.screenshot",
|
|
76
|
+
"path": "screenshots/swap-live-quote.png",
|
|
77
|
+
"label": "Authorized live Swap quote",
|
|
78
|
+
"intent": "Preserve the reviewed quote before live submission",
|
|
79
|
+
"next": "submit-transaction"
|
|
80
|
+
},
|
|
81
|
+
"submit-transaction": {
|
|
82
|
+
"action": "metamask.swap_bridge.submit_transaction",
|
|
83
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
84
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
85
|
+
"amount": "{{params.amount}}",
|
|
86
|
+
"confirm_live": "{{params.confirm_live}}",
|
|
87
|
+
"timeout_ms": "{{params.transaction_timeout_ms}}",
|
|
88
|
+
"intent": "Submit the authorized live Swap and prove confirmed Activity details",
|
|
89
|
+
"next": "capture-confirmed"
|
|
90
|
+
},
|
|
91
|
+
"capture-confirmed": {
|
|
92
|
+
"action": "ui.screenshot",
|
|
93
|
+
"path": "screenshots/swap-live-confirmed.png",
|
|
94
|
+
"label": "Confirmed live Swap",
|
|
95
|
+
"intent": "Preserve the confirmed destination balance evidence",
|
|
96
|
+
"next": "done"
|
|
97
|
+
},
|
|
98
|
+
"done": { "action": "end", "status": "pass" }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Swap release Max quote",
|
|
4
|
+
"description": "Selects an exact live pair, uses the visible Max balance, and proves the resulting quote without submission.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"source_symbol": { "type": "string" },
|
|
10
|
+
"destination_symbol": { "type": "string" },
|
|
11
|
+
"source_chain": { "type": "string" },
|
|
12
|
+
"destination_chain": { "type": "string" },
|
|
13
|
+
"source_query": { "type": "string" },
|
|
14
|
+
"destination_query": { "type": "string" },
|
|
15
|
+
"source_asset_id": { "type": "string", "default": "" },
|
|
16
|
+
"destination_asset_id": { "type": "string", "default": "" },
|
|
17
|
+
"timeout_ms": { "type": "integer", "minimum": 1000, "default": 120000 }
|
|
18
|
+
},
|
|
19
|
+
"required": ["source_symbol", "destination_symbol", "source_chain", "destination_chain", "source_query", "destination_query"]
|
|
20
|
+
},
|
|
21
|
+
"workflow": {
|
|
22
|
+
"entry": "open-swap",
|
|
23
|
+
"nodes": {
|
|
24
|
+
"open-swap": {
|
|
25
|
+
"action": "ui.navigate",
|
|
26
|
+
"page": "swap",
|
|
27
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
28
|
+
"intent": "Open Swap through visible product navigation",
|
|
29
|
+
"next": "select-assets"
|
|
30
|
+
},
|
|
31
|
+
"select-assets": {
|
|
32
|
+
"action": "metamask.swap_bridge.select_assets",
|
|
33
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
34
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
35
|
+
"source_chain": "{{params.source_chain}}",
|
|
36
|
+
"destination_chain": "{{params.destination_chain}}",
|
|
37
|
+
"source_query": "{{params.source_query}}",
|
|
38
|
+
"destination_query": "{{params.destination_query}}",
|
|
39
|
+
"source_asset_id": "{{params.source_asset_id}}",
|
|
40
|
+
"destination_asset_id": "{{params.destination_asset_id}}",
|
|
41
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
42
|
+
"intent": "Select the exact source and destination assets",
|
|
43
|
+
"next": "use-max"
|
|
44
|
+
},
|
|
45
|
+
"use-max": {
|
|
46
|
+
"action": "metamask.swap_bridge.set_max_amount",
|
|
47
|
+
"wait_for_quote": true,
|
|
48
|
+
"timeout_ms": "{{params.timeout_ms}}",
|
|
49
|
+
"intent": "Use the visible available source balance",
|
|
50
|
+
"next": "assert-quote"
|
|
51
|
+
},
|
|
52
|
+
"assert-quote": {
|
|
53
|
+
"action": "metamask.swap_bridge.read_visible_state",
|
|
54
|
+
"source_symbol": "{{params.source_symbol}}",
|
|
55
|
+
"destination_symbol": "{{params.destination_symbol}}",
|
|
56
|
+
"require_amount_inputs": true,
|
|
57
|
+
"require_settings": true,
|
|
58
|
+
"require_quote": true,
|
|
59
|
+
"intent": "Prove the selected pair and Max quote remain visible",
|
|
60
|
+
"next": "capture-quote"
|
|
61
|
+
},
|
|
62
|
+
"capture-quote": {
|
|
63
|
+
"action": "ui.screenshot",
|
|
64
|
+
"path": "screenshots/swap-max-quote.png",
|
|
65
|
+
"label": "Swap Max quote",
|
|
66
|
+
"intent": "Preserve reviewer-visible proof of the Max quote",
|
|
67
|
+
"next": "done"
|
|
68
|
+
},
|
|
69
|
+
"done": { "action": "end", "status": "pass" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|