From a01ad91c604881f857acbe4a5fda5d8a88e2770a Mon Sep 17 00:00:00 2001 From: Gosuto Inzasheru Date: Tue, 23 Jul 2024 20:31:04 +0200 Subject: [PATCH 01/10] fix: solve filename typo --- action-scripts/brownie/.gitgnore | 3 --- action-scripts/brownie/.gitignore | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 action-scripts/brownie/.gitgnore diff --git a/action-scripts/brownie/.gitgnore b/action-scripts/brownie/.gitgnore deleted file mode 100644 index 1e35262e0..000000000 --- a/action-scripts/brownie/.gitgnore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -package-lock.json -package.json \ No newline at end of file diff --git a/action-scripts/brownie/.gitignore b/action-scripts/brownie/.gitignore index c119adf34..e4b449830 100644 --- a/action-scripts/brownie/.gitignore +++ b/action-scripts/brownie/.gitignore @@ -8,4 +8,9 @@ reports/ output.txt validate_bip_results.txt ./outputs.txt -payload_reports.txt \ No newline at end of file +payload_reports.txt + +# npm +node_modules/ +package-lock.json +package.json From 1c94612ff92e177c2eafeaab179c189b145a95ac Mon Sep 17 00:00:00 2001 From: Gosuto Inzasheru Date: Tue, 23 Jul 2024 20:31:21 +0200 Subject: [PATCH 02/10] chore: clean up reqs file --- action-scripts/brownie/requirements-actions.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/action-scripts/brownie/requirements-actions.txt b/action-scripts/brownie/requirements-actions.txt index ccd9f2721..c8ca8738b 100644 --- a/action-scripts/brownie/requirements-actions.txt +++ b/action-scripts/brownie/requirements-actions.txt @@ -1,4 +1,3 @@ -##eth-brownie==1.19.3 git+https://github.com/BalancerMaxis/bal_addresses@0.9.5 git+https://github.com/BalancerMaxis/brownie@v1.20.x prettytable From 37d069aacf473eb2e51274509aa195a332a57367 Mon Sep 17 00:00:00 2001 From: Gosuto Inzasheru Date: Tue, 23 Jul 2024 21:15:51 +0200 Subject: [PATCH 03/10] feat: check for partial reverts in tenderly result --- .../brownie/scripts/script_utils.py | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/action-scripts/brownie/scripts/script_utils.py b/action-scripts/brownie/scripts/script_utils.py index 5fb48e2e8..c923cdba8 100644 --- a/action-scripts/brownie/scripts/script_utils.py +++ b/action-scripts/brownie/scripts/script_utils.py @@ -359,10 +359,27 @@ def run_tenderly_sim(network_id: str, safe_addr: str, transactions: list[dict]): print(r.json()) url = f"https://www.tdly.co/shared/simulation/{result['simulation']['id']}" - success = result["simulation"]["status"] + if result["simulation"]["status"]: + success = '🟩 SUCCESS' + revert_found = check_tenderly_calls_for_revert(result['transaction']['transaction_info']['call_trace']['calls']) + if revert_found: + success = '🟨 PARTIAL' + else: + success = '🟥 FAILURE' return url, success +def check_tenderly_calls_for_revert(calls): + for call in calls: + if 'error_op' in call: + if call['error_op'] == 'REVERT': + return True + if 'calls' in call: + if isinstance(call['calls'], list): + if check_tenderly_calls_for_revert(call['calls']): + return True + + def format_into_report( file: dict, transactions: list[dict], @@ -394,12 +411,9 @@ def format_into_report( file["meta"]["createdFromSafeAddress"], file["transactions"], ) - if tenderly_success: - file_report += f"TENDERLY: [SUCCESS]({tenderly_url})\n" - else: - file_report += f"TENDERLY: [FAILURE]({tenderly_url})\n" + file_report += f"TENDERLY: `[{tenderly_success}]({tenderly_url})`\n" except Exception as e: - file_report += f"TENDERLY: SKIPPED (`{repr(e)}`)\n" + file_report += f"TENDERLY: `🟪 SKIPPED ({repr(e)})`\n" file_report += "```\n" file_report += convert_output_into_table(transactions) From 0d70963b279a6cb61e1a8b304d86539375fddd59 Mon Sep 17 00:00:00 2001 From: Gosuto Inzasheru Date: Wed, 24 Jul 2024 05:19:28 +0200 Subject: [PATCH 04/10] test: move payloads within 69 dir to trigger reports --- BIPs/4269-W69/{ => test}/BIP-535.json | 0 BIPs/4269-W69/{ => test}/BIP-535.report.txt | 0 BIPs/4269-W69/{ => test}/BIP-536.json | 0 BIPs/4269-W69/{ => test}/BIP-536.report.txt | 0 BIPs/4269-W69/{ => test}/BIP-537.json | 0 BIPs/4269-W69/{ => test}/BIP-537.report.txt | 0 BIPs/4269-W69/test/BIP-653.json | 100 ++++++++++++++++++++ BIPs/4269-W69/test/BIP-653.report.txt | 50 ++++++++++ 8 files changed, 150 insertions(+) rename BIPs/4269-W69/{ => test}/BIP-535.json (100%) rename BIPs/4269-W69/{ => test}/BIP-535.report.txt (100%) rename BIPs/4269-W69/{ => test}/BIP-536.json (100%) rename BIPs/4269-W69/{ => test}/BIP-536.report.txt (100%) rename BIPs/4269-W69/{ => test}/BIP-537.json (100%) rename BIPs/4269-W69/{ => test}/BIP-537.report.txt (100%) create mode 100644 BIPs/4269-W69/test/BIP-653.json create mode 100644 BIPs/4269-W69/test/BIP-653.report.txt diff --git a/BIPs/4269-W69/BIP-535.json b/BIPs/4269-W69/test/BIP-535.json similarity index 100% rename from BIPs/4269-W69/BIP-535.json rename to BIPs/4269-W69/test/BIP-535.json diff --git a/BIPs/4269-W69/BIP-535.report.txt b/BIPs/4269-W69/test/BIP-535.report.txt similarity index 100% rename from BIPs/4269-W69/BIP-535.report.txt rename to BIPs/4269-W69/test/BIP-535.report.txt diff --git a/BIPs/4269-W69/BIP-536.json b/BIPs/4269-W69/test/BIP-536.json similarity index 100% rename from BIPs/4269-W69/BIP-536.json rename to BIPs/4269-W69/test/BIP-536.json diff --git a/BIPs/4269-W69/BIP-536.report.txt b/BIPs/4269-W69/test/BIP-536.report.txt similarity index 100% rename from BIPs/4269-W69/BIP-536.report.txt rename to BIPs/4269-W69/test/BIP-536.report.txt diff --git a/BIPs/4269-W69/BIP-537.json b/BIPs/4269-W69/test/BIP-537.json similarity index 100% rename from BIPs/4269-W69/BIP-537.json rename to BIPs/4269-W69/test/BIP-537.json diff --git a/BIPs/4269-W69/BIP-537.report.txt b/BIPs/4269-W69/test/BIP-537.report.txt similarity index 100% rename from BIPs/4269-W69/BIP-537.report.txt rename to BIPs/4269-W69/test/BIP-537.report.txt diff --git a/BIPs/4269-W69/test/BIP-653.json b/BIPs/4269-W69/test/BIP-653.json new file mode 100644 index 000000000..dcc5dd96a --- /dev/null +++ b/BIPs/4269-W69/test/BIP-653.json @@ -0,0 +1,100 @@ +{ + "version": "1.0", + "chainId": "1", + "createdAt": 1719444309555, + "meta": { + "name": "Update Paladins Reward Distributors", + "description": "", + "txBuilderVersion": "1.16.5", + "createdFromSafeAddress": "0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f", + "createdFromOwnerAddress": "", + "checksum": "0xeeb50b8f3abf0c5f23b17181f1c01b629930f08c059f6685e08c564e84530b0a" + }, + "transactions": [ + { + "to": "0xA331D84eC860Bf466b4CdCcFb4aC09a1B43F3aE6", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "grantRole", + "payable": false + }, + "contractInputsValues": { + "role": "0xd0090a09f425bba74e6c801fba7c6d15b44147ab0bd319e40076ce07e95168b6", + "account": "0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f" + } + }, + { + "to": "0xBC02eF87f4E15EF78A571f3B2aDcC726Fee70d8b", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { "name": "_reward_token", "type": "address" }, + { "name": "_distributor", "type": "address" } + ], + "name": "set_reward_distributor", + "payable": false + }, + "contractInputsValues": { + "_reward_token": "0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68", + "_distributor": "0xfEb352930cA196a80B708CDD5dcb4eCA94805daB" + } + }, + { + "to": "0xCD19892916929F013930ed628547Cc1F439b230e", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { "name": "_reward_token", "type": "address" }, + { "name": "_distributor", "type": "address" } + ], + "name": "set_reward_distributor", + "payable": false + }, + "contractInputsValues": { + "_reward_token": "0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68", + "_distributor": "0xfEb352930cA196a80B708CDD5dcb4eCA94805daB" + } + }, + { + "to": "0x21c377cBB2bEdDd8534308E5CdfeBE35fDF817E8", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { "name": "_reward_token", "type": "address" }, + { "name": "_distributor", "type": "address" } + ], + "name": "set_reward_distributor", + "payable": false + }, + "contractInputsValues": { + "_reward_token": "0xCdF7028ceAB81fA0C6971208e83fa7872994beE5", + "_distributor": "0xfEb352930cA196a80B708CDD5dcb4eCA94805daB" + } + }, + { + "to": "0xA331D84eC860Bf466b4CdCcFb4aC09a1B43F3aE6", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "revokeRole", + "payable": false + }, + "contractInputsValues": { + "role": "0xd0090a09f425bba74e6c801fba7c6d15b44147ab0bd319e40076ce07e95168b6", + "account": "0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f" + } + } + ] +} diff --git a/BIPs/4269-W69/test/BIP-653.report.txt b/BIPs/4269-W69/test/BIP-653.report.txt new file mode 100644 index 000000000..42429825d --- /dev/null +++ b/BIPs/4269-W69/test/BIP-653.report.txt @@ -0,0 +1,50 @@ +FILENAME: `BIPs/2024-W29/BIP-653.json` +MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` +COMMIT: `51bc896a16ee0216715df1cd0a3e001b852acf4d` +CHAIN(S): `mainnet` +TENDERLY: [SUCCESS](https://www.tdly.co/shared/simulation/e052e42e-c756-4166-84ab-4e80a6e93bdc) +``` ++-----------------------+---------------+--------------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------+---------+----------+ +| function | caller_name | caller_address | fx_paths | action_ids | bip | tx_index | ++-----------------------+---------------+--------------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------+---------+----------+ +| Authorizer/grantRole | multisigs/dao | 0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f | 20220325-mainnet-gauge-factory/LiquidityGaugeV5/set_reward_distributor(address,address) | 0xd0090a09f425bba74e6c801fba7c6d15b44147ab0bd319e40076ce07e95168b6 | BIP-653 | 0 | +| | | | 20220822-mainnet-gauge-factory-v2/LiquidityGaugeV5/set_reward_distributor(address,address) | | | | +| Authorizer/revokeRole | multisigs/dao | 0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f | 20220325-mainnet-gauge-factory/LiquidityGaugeV5/set_reward_distributor(address,address) | 0xd0090a09f425bba74e6c801fba7c6d15b44147ab0bd319e40076ce07e95168b6 | BIP-653 | 4 | +| | | | 20220822-mainnet-gauge-factory-v2/LiquidityGaugeV5/set_reward_distributor(address,address) | | | | ++-----------------------+---------------+--------------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------+---------+----------+ +``` +FILENAME: `BIPs/2024-W29/BIP-653.json` +MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` +COMMIT: `51bc896a16ee0216715df1cd0a3e001b852acf4d` +CHAIN(S): `mainnet` +TENDERLY: [SUCCESS](https://www.tdly.co/shared/simulation/bf6d452f-fbca-4544-b5a4-585b129b2168) +``` ++------------------------+-------------------------------------------------------------------------------+-------+---------------------------------------------------------------------------+------------+----------+ +| fx_name | to | value | inputs | bip_number | tx_index | ++------------------------+-------------------------------------------------------------------------------+-------+---------------------------------------------------------------------------+------------+----------+ +| set_reward_distributor | 0xBC02eF87f4E15EF78A571f3B2aDcC726Fee70d8b (gauges/DOLA-USDC BSP-gauge-bc02) | 0 | { | BIP-653 | N/A | +| | | | "_reward_token": [ | | | +| | | | "0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68 (tokens/INV)" | | | +| | | | ], | | | +| | | | "_distributor": [ | | | +| | | | "0xfEb352930cA196a80B708CDD5dcb4eCA94805daB (paladin/QuestBoardV2_1)" | | | +| | | | ] | | | +| | | | } | | | +| set_reward_distributor | 0xCD19892916929F013930ed628547Cc1F439b230e (gauges/sDOLA-DOLA BSP-gauge-cd19) | 0 | { | BIP-653 | N/A | +| | | | "_reward_token": [ | | | +| | | | "0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68 (tokens/INV)" | | | +| | | | ], | | | +| | | | "_distributor": [ | | | +| | | | "0xfEb352930cA196a80B708CDD5dcb4eCA94805daB (paladin/QuestBoardV2_1)" | | | +| | | | ] | | | +| | | | } | | | +| set_reward_distributor | 0x21c377cBB2bEdDd8534308E5CdfeBE35fDF817E8 (gauges/2BTC-gauge-21c3) | 0 | { | BIP-653 | N/A | +| | | | "_reward_token": [ | | | +| | | | "0xCdF7028ceAB81fA0C6971208e83fa7872994beE5 (tokens/T)" | | | +| | | | ], | | | +| | | | "_distributor": [ | | | +| | | | "0xfEb352930cA196a80B708CDD5dcb4eCA94805daB (paladin/QuestBoardV2_1)" | | | +| | | | ] | | | +| | | | } | | | ++------------------------+-------------------------------------------------------------------------------+-------+---------------------------------------------------------------------------+------------+----------+ +``` From 7e0ebf9ee80b998f9eb3b0661c29c32d2c54c036 Mon Sep 17 00:00:00 2001 From: Gosuto Inzasheru Date: Wed, 24 Jul 2024 14:04:52 +0900 Subject: [PATCH 05/10] test: corrupt payload to provoke skipped tenderly sim --- ...IP-605-inankrETH-ankrETH-Gauge.json => BIP-605-corrupt.json} | 2 +- ...5-inankrETH-ankrETH-Gauge.report.txt => BIP-605-corrupt.txt} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename BIPs/4269-W69/{BIP-605-inankrETH-ankrETH-Gauge.json => BIP-605-corrupt.json} (93%) rename BIPs/4269-W69/{BIP-605-inankrETH-ankrETH-Gauge.report.txt => BIP-605-corrupt.txt} (100%) diff --git a/BIPs/4269-W69/BIP-605-inankrETH-ankrETH-Gauge.json b/BIPs/4269-W69/BIP-605-corrupt.json similarity index 93% rename from BIPs/4269-W69/BIP-605-inankrETH-ankrETH-Gauge.json rename to BIPs/4269-W69/BIP-605-corrupt.json index 3196f4b30..47a57f25d 100644 --- a/BIPs/4269-W69/BIP-605-inankrETH-ankrETH-Gauge.json +++ b/BIPs/4269-W69/BIP-605-corrupt.json @@ -24,7 +24,7 @@ "payable": false }, "contractInputsValues": { - "gauge": "0xCC9723faDed81a9448a9664c39C0Df2e77FDfA2E", + "gauge": "corrupt", "gaugeType": "Ethereum" } } diff --git a/BIPs/4269-W69/BIP-605-inankrETH-ankrETH-Gauge.report.txt b/BIPs/4269-W69/BIP-605-corrupt.txt similarity index 100% rename from BIPs/4269-W69/BIP-605-inankrETH-ankrETH-Gauge.report.txt rename to BIPs/4269-W69/BIP-605-corrupt.txt From 09c4a6af799177ff23702c672270e5ed97804476 Mon Sep 17 00:00:00 2001 From: gosuto-inzasheru Date: Wed, 24 Jul 2024 05:05:32 +0000 Subject: [PATCH 06/10] style: ci lint with `black` --- .../brownie/scripts/script_utils.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/action-scripts/brownie/scripts/script_utils.py b/action-scripts/brownie/scripts/script_utils.py index c923cdba8..9c42ff10a 100644 --- a/action-scripts/brownie/scripts/script_utils.py +++ b/action-scripts/brownie/scripts/script_utils.py @@ -360,23 +360,25 @@ def run_tenderly_sim(network_id: str, safe_addr: str, transactions: list[dict]): url = f"https://www.tdly.co/shared/simulation/{result['simulation']['id']}" if result["simulation"]["status"]: - success = '🟩 SUCCESS' - revert_found = check_tenderly_calls_for_revert(result['transaction']['transaction_info']['call_trace']['calls']) + success = "🟩 SUCCESS" + revert_found = check_tenderly_calls_for_revert( + result["transaction"]["transaction_info"]["call_trace"]["calls"] + ) if revert_found: - success = '🟨 PARTIAL' + success = "🟨 PARTIAL" else: - success = '🟥 FAILURE' + success = "🟥 FAILURE" return url, success def check_tenderly_calls_for_revert(calls): for call in calls: - if 'error_op' in call: - if call['error_op'] == 'REVERT': + if "error_op" in call: + if call["error_op"] == "REVERT": return True - if 'calls' in call: - if isinstance(call['calls'], list): - if check_tenderly_calls_for_revert(call['calls']): + if "calls" in call: + if isinstance(call["calls"], list): + if check_tenderly_calls_for_revert(call["calls"]): return True From 0b60139b842ffd73c920b423bc64d59b76b6293c Mon Sep 17 00:00:00 2001 From: Gosuto Inzasheru Date: Wed, 24 Jul 2024 14:11:51 +0900 Subject: [PATCH 07/10] fix: corrupt by changing data type --- BIPs/4269-W69/BIP-605-corrupt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BIPs/4269-W69/BIP-605-corrupt.json b/BIPs/4269-W69/BIP-605-corrupt.json index 47a57f25d..a475202f6 100644 --- a/BIPs/4269-W69/BIP-605-corrupt.json +++ b/BIPs/4269-W69/BIP-605-corrupt.json @@ -24,7 +24,7 @@ "payable": false }, "contractInputsValues": { - "gauge": "corrupt", + "gauge": [], "gaugeType": "Ethereum" } } From a29fc125b2adc19d2f9fa733c458d79e31ca4e68 Mon Sep 17 00:00:00 2001 From: gosuto-inzasheru Date: Wed, 24 Jul 2024 05:16:02 +0000 Subject: [PATCH 08/10] Automated processing of Payload PR (validations, transformations, and reports) + reformat JSON --- BIPs/4269-W69/BIP-605-corrupt.report.txt | 16 ++++++++++ BIPs/4269-W69/test/BIP-535.report.txt | 39 +++++++++++++++++------- BIPs/4269-W69/test/BIP-536.report.txt | 20 ++++++------ BIPs/4269-W69/test/BIP-537.report.txt | 16 +++++----- BIPs/4269-W69/test/BIP-653.report.txt | 12 ++++---- 5 files changed, 68 insertions(+), 35 deletions(-) create mode 100644 BIPs/4269-W69/BIP-605-corrupt.report.txt diff --git a/BIPs/4269-W69/BIP-605-corrupt.report.txt b/BIPs/4269-W69/BIP-605-corrupt.report.txt new file mode 100644 index 000000000..c8f52c456 --- /dev/null +++ b/BIPs/4269-W69/BIP-605-corrupt.report.txt @@ -0,0 +1,16 @@ +FILENAME: `BIPs/4269-W69/BIP-605-corrupt.json` +MULTISIG: `multisigs/lm (mainnet:0xc38c5f97B34E175FFd35407fc91a937300E33860)` +COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` +CHAIN(S): `mainnet` +TENDERLY: `🟪 SKIPPED (TypeError("Unsupported type: ''. Must be one of: bool, str, bytes, bytearrayor int."))` +``` ++----------+---------------------------------------------------------------------------------+-------+------------------+------------+----------+ +| fx_name | to | value | inputs | bip_number | tx_index | ++----------+---------------------------------------------------------------------------------+-------+------------------+------------+----------+ +| addGauge | 0x5DbAd78818D4c8958EfF2d5b95b28385A22113Cd (20230519-gauge-adder-v4/GaugeAdder) | 0 | { | BIP-605 | N/A | +| | | | "gaugeType": [ | | | +| | | | "Ethereum" | | | +| | | | ] | | | +| | | | } | | | ++----------+---------------------------------------------------------------------------------+-------+------------------+------------+----------+ +``` diff --git a/BIPs/4269-W69/test/BIP-535.report.txt b/BIPs/4269-W69/test/BIP-535.report.txt index 22d019451..b5279b1e9 100644 --- a/BIPs/4269-W69/test/BIP-535.report.txt +++ b/BIPs/4269-W69/test/BIP-535.report.txt @@ -1,14 +1,31 @@ -FILENAME: `BIPs/4269-W69/BIP-535.json` +FILENAME: `BIPs/4269-W69/test/BIP-535.json` MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` -COMMIT: `0facc58da485a556960ec14ea6fdeec5dbe7b8de` +COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` CHAIN(S): `mainnet` -TENDERLY: [SUCCESS](https://www.tdly.co/shared/simulation/f80e05ae-85cf-42d0-a31e-6068bd1d0170) -``` -+------------+-------------------------------------------------+------------------------------------------------+---------------------------+---------+------------+ -| function | token_symbol | recipient | amount | bip | tx_index | -+============+=================================================+================================================+===========================+=========+============+ -| transfer | USDC:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | N/A:0xDe5cbE25c58c49Ee7635216de6998f8dAcD63b96 | 4382.14 (RAW: 4382140000) | BIP-535 | 0 | -+------------+-------------------------------------------------+------------------------------------------------+---------------------------+---------+------------+ -| transfer | USDC:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | N/A:0xc4F95f674b393a49410acE864833abE836848526 | 4088.24 (RAW: 4088240000) | BIP-535 | 1 | -+------------+-------------------------------------------------+------------------------------------------------+---------------------------+---------+------------+ +TENDERLY: `[🟩 SUCCESS](https://www.tdly.co/shared/simulation/770a21ac-d4a2-4a47-a2f5-dbb464fa156a)` +``` ++----------+-------------------------------------------------+------------------------------------------------+---------------------------+---------+----------+ +| function | token_symbol | recipient | amount | bip | tx_index | ++----------+-------------------------------------------------+------------------------------------------------+---------------------------+---------+----------+ +| transfer | USDC:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | N/A:0xc4F95f674b393a49410acE864833abE836848526 | 4088.24 (RAW: 4088240000) | BIP-535 | 1 | ++----------+-------------------------------------------------+------------------------------------------------+---------------------------+---------+----------+ +``` +FILENAME: `BIPs/4269-W69/test/BIP-535.json` +MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` +COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` +CHAIN(S): `mainnet` +TENDERLY: `[🟩 SUCCESS](https://www.tdly.co/shared/simulation/dc3460f7-79f2-4239-8170-94e59ab9e92b)` +``` ++----------+----------------------------------------------------------+-------+-------------------------------------------------------------------+------------+----------+ +| fx_name | to | value | inputs | bip_number | tx_index | ++----------+----------------------------------------------------------+-------+-------------------------------------------------------------------+------------+----------+ +| transfer | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 (tokens/USDC) | 0 | { | BIP-535 | N/A | +| | | | "to": [ | | | +| | | | "0xDe5cbE25c58c49Ee7635216de6998f8dAcD63b96 (N/A)" | | | +| | | | ], | | | +| | | | "value": [ | | | +| | | | "raw:4382140000, 18 decimals:4.38214E-9, 6 decimals: 4382.14" | | | +| | | | ] | | | +| | | | } | | | ++----------+----------------------------------------------------------+-------+-------------------------------------------------------------------+------------+----------+ ``` diff --git a/BIPs/4269-W69/test/BIP-536.report.txt b/BIPs/4269-W69/test/BIP-536.report.txt index f18de154c..e373b8d18 100644 --- a/BIPs/4269-W69/test/BIP-536.report.txt +++ b/BIPs/4269-W69/test/BIP-536.report.txt @@ -1,14 +1,14 @@ -FILENAME: `BIPs/4269-W69/BIP-536.json` +FILENAME: `BIPs/4269-W69/test/BIP-536.json` MULTISIG: `multisigs/lm (mainnet:0xc38c5f97B34E175FFd35407fc91a937300E33860)` -COMMIT: `0facc58da485a556960ec14ea6fdeec5dbe7b8de` +COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` CHAIN(S): `mainnet` -TENDERLY: [FAILURE](https://www.tdly.co/shared/simulation/f2d3b588-3181-46f9-b8b2-1345aad8d58f) +TENDERLY: `[🟥 FAILURE](https://www.tdly.co/shared/simulation/217d69cb-bb41-463d-b4c2-c06656f56e3d)` ``` -+-----------------------+---------------------------------------------------------------------+--------------------------+--------------------------------------------+---------------------------------------------------------------+-------------------------------------------------+---------+------------+ -| function | pool_id_and_address | symbol_and_info | gauge_address_and_info | tokens | rate_providers | bip | tx_index | -+=======================+=====================================================================+==========================+============================================+===============================================================+=================================================+=========+============+ -| GaugeAdderV4/addGauge | 0x383e7859271b2d0589b013b6d944572a0a8be3cb000000000000000000000657 | DOLA-mkUSD BSP | 0x6D560CbE3Cc25Eca8c930835Ec3d296a6C16B210 | "DOLA-mkUSD BSP(0x383e7859271B2D0589B013b6d944572a0a8bE3cB)", | "0x0000000000000000000000000000000000000000", | BIP-536 | 0 | -| | pool_address: 0x383e7859271B2D0589B013b6d944572a0a8bE3cB | fee: 0.04, a-factor: 100 | Style: mainnet, cap: 100.0% | "mkUSD(0x4591DBfF62656E7859Afe5e45f6f47D3669fBB28)", | "0x0000000000000000000000000000000000000000", | | | -| | | | | "DOLA(0x865377367054516e17014CcdED1e7d814EDC9ce4)" | "0x0000000000000000000000000000000000000000" | | | -+-----------------------+---------------------------------------------------------------------+--------------------------+--------------------------------------------+---------------------------------------------------------------+-------------------------------------------------+---------+------------+ ++-----------------------+---------------------------------------------------------------------+-----------------+--------------------------------------------+------------------------------------------------------------+--------------------------------------------+----------------+---------+----------+ +| function | pool_id_and_address | symbol_and_info | gauge_address_and_info | tokens | rate_providers | review_summary | bip | tx_index | ++-----------------------+---------------------------------------------------------------------+-----------------+--------------------------------------------+------------------------------------------------------------+--------------------------------------------+----------------+---------+----------+ +| GaugeAdderV4/addGauge | 0x383e7859271b2d0589b013b6d944572a0a8be3cb000000000000000000000657 | DOLA-mkUSD BSP | 0x6D560CbE3Cc25Eca8c930835Ec3d296a6C16B210 | 0x383e7859271B2D0589B013b6d944572a0a8bE3cB: DOLA-mkUSD BSP | 0x0000000000000000000000000000000000000000 | -- | BIP-536 | 0 | +| | pool_address: 0x383e7859271B2D0589B013b6d944572a0a8bE3cB | fee: 0.04 | Style: mainnet | 0x4591DBfF62656E7859Afe5e45f6f47D3669fBB28: mkUSD | 0x0000000000000000000000000000000000000000 | -- | | | +| | | a-factor: 100 | cap: 100.0% | 0x865377367054516e17014CcdED1e7d814EDC9ce4: DOLA | 0x0000000000000000000000000000000000000000 | -- | | | ++-----------------------+---------------------------------------------------------------------+-----------------+--------------------------------------------+------------------------------------------------------------+--------------------------------------------+----------------+---------+----------+ ``` diff --git a/BIPs/4269-W69/test/BIP-537.report.txt b/BIPs/4269-W69/test/BIP-537.report.txt index 95bdc716b..ab4c2f70b 100644 --- a/BIPs/4269-W69/test/BIP-537.report.txt +++ b/BIPs/4269-W69/test/BIP-537.report.txt @@ -1,12 +1,12 @@ -FILENAME: `BIPs/4269-W69/BIP-537.json` +FILENAME: `BIPs/4269-W69/test/BIP-537.json` MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` -COMMIT: `0facc58da485a556960ec14ea6fdeec5dbe7b8de` +COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` CHAIN(S): `mainnet` -TENDERLY: [SUCCESS](https://www.tdly.co/shared/simulation/866c154b-41bb-4e7d-9bff-7d67ef14e051) +TENDERLY: `[🟩 SUCCESS](https://www.tdly.co/shared/simulation/bc5eab6d-eb19-4914-84c9-eee5c85e650a)` ``` -+------------+------------------------------------------------+---------------------------------------------------------+--------------------------------------+---------+------------+ -| function | token_symbol | recipient | amount | bip | tx_index | -+============+================================================+=========================================================+======================================+=========+============+ -| transfer | BAL:0xba100000625a3754423978a60c9317c58a424e3D | multisigs/lm:0xc38c5f97B34E175FFd35407fc91a937300E33860 | 6545.0 (RAW: 6545000000000000000000) | BIP-537 | 0 | -+------------+------------------------------------------------+---------------------------------------------------------+--------------------------------------+---------+------------+ ++----------+------------------------------------------------+---------------------------------------------------------+--------------------------------------+---------+----------+ +| function | token_symbol | recipient | amount | bip | tx_index | ++----------+------------------------------------------------+---------------------------------------------------------+--------------------------------------+---------+----------+ +| transfer | BAL:0xba100000625a3754423978a60c9317c58a424e3D | multisigs/lm:0xc38c5f97B34E175FFd35407fc91a937300E33860 | 6545.0 (RAW: 6545000000000000000000) | BIP-537 | 0 | ++----------+------------------------------------------------+---------------------------------------------------------+--------------------------------------+---------+----------+ ``` diff --git a/BIPs/4269-W69/test/BIP-653.report.txt b/BIPs/4269-W69/test/BIP-653.report.txt index 42429825d..9b00a9ae0 100644 --- a/BIPs/4269-W69/test/BIP-653.report.txt +++ b/BIPs/4269-W69/test/BIP-653.report.txt @@ -1,8 +1,8 @@ -FILENAME: `BIPs/2024-W29/BIP-653.json` +FILENAME: `BIPs/4269-W69/test/BIP-653.json` MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` -COMMIT: `51bc896a16ee0216715df1cd0a3e001b852acf4d` +COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` CHAIN(S): `mainnet` -TENDERLY: [SUCCESS](https://www.tdly.co/shared/simulation/e052e42e-c756-4166-84ab-4e80a6e93bdc) +TENDERLY: `[🟨 PARTIAL](https://www.tdly.co/shared/simulation/e39c47a3-2a19-4e4d-88cb-188165be9093)` ``` +-----------------------+---------------+--------------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------+---------+----------+ | function | caller_name | caller_address | fx_paths | action_ids | bip | tx_index | @@ -13,11 +13,11 @@ TENDERLY: [SUCCESS](https://www.tdly.co/shared/simulation/e052e42e-c756-4166-84a | | | | 20220822-mainnet-gauge-factory-v2/LiquidityGaugeV5/set_reward_distributor(address,address) | | | | +-----------------------+---------------+--------------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------+---------+----------+ ``` -FILENAME: `BIPs/2024-W29/BIP-653.json` +FILENAME: `BIPs/4269-W69/test/BIP-653.json` MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` -COMMIT: `51bc896a16ee0216715df1cd0a3e001b852acf4d` +COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` CHAIN(S): `mainnet` -TENDERLY: [SUCCESS](https://www.tdly.co/shared/simulation/bf6d452f-fbca-4544-b5a4-585b129b2168) +TENDERLY: `[🟨 PARTIAL](https://www.tdly.co/shared/simulation/9300a969-2f27-43c0-8656-92f2296b2e10)` ``` +------------------------+-------------------------------------------------------------------------------+-------+---------------------------------------------------------------------------+------------+----------+ | fx_name | to | value | inputs | bip_number | tx_index | From ae088b4beb46018fb71670d841fa127dbbc89066 Mon Sep 17 00:00:00 2001 From: Gosuto Inzasheru Date: Wed, 24 Jul 2024 14:20:30 +0900 Subject: [PATCH 09/10] fix: formatting --- action-scripts/brownie/scripts/script_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action-scripts/brownie/scripts/script_utils.py b/action-scripts/brownie/scripts/script_utils.py index 9c42ff10a..594530cf9 100644 --- a/action-scripts/brownie/scripts/script_utils.py +++ b/action-scripts/brownie/scripts/script_utils.py @@ -413,7 +413,7 @@ def format_into_report( file["meta"]["createdFromSafeAddress"], file["transactions"], ) - file_report += f"TENDERLY: `[{tenderly_success}]({tenderly_url})`\n" + file_report += f"TENDERLY: [`{tenderly_success}`]({tenderly_url})\n" except Exception as e: file_report += f"TENDERLY: `🟪 SKIPPED ({repr(e)})`\n" From 54ef25f61341484521af54f12761280776774a32 Mon Sep 17 00:00:00 2001 From: gosuto-inzasheru Date: Wed, 24 Jul 2024 05:23:49 +0000 Subject: [PATCH 10/10] Automated processing of Payload PR (validations, transformations, and reports) + reformat JSON --- BIPs/4269-W69/BIP-605-corrupt.report.txt | 2 +- BIPs/4269-W69/test/BIP-535.report.txt | 24 +++--------------------- BIPs/4269-W69/test/BIP-536.report.txt | 4 ++-- BIPs/4269-W69/test/BIP-537.report.txt | 4 ++-- BIPs/4269-W69/test/BIP-653.report.txt | 16 ++++++++-------- 5 files changed, 16 insertions(+), 34 deletions(-) diff --git a/BIPs/4269-W69/BIP-605-corrupt.report.txt b/BIPs/4269-W69/BIP-605-corrupt.report.txt index c8f52c456..1479601e5 100644 --- a/BIPs/4269-W69/BIP-605-corrupt.report.txt +++ b/BIPs/4269-W69/BIP-605-corrupt.report.txt @@ -1,6 +1,6 @@ FILENAME: `BIPs/4269-W69/BIP-605-corrupt.json` MULTISIG: `multisigs/lm (mainnet:0xc38c5f97B34E175FFd35407fc91a937300E33860)` -COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` +COMMIT: `ae088b4beb46018fb71670d841fa127dbbc89066` CHAIN(S): `mainnet` TENDERLY: `🟪 SKIPPED (TypeError("Unsupported type: ''. Must be one of: bool, str, bytes, bytearrayor int."))` ``` diff --git a/BIPs/4269-W69/test/BIP-535.report.txt b/BIPs/4269-W69/test/BIP-535.report.txt index b5279b1e9..57d6eb4cc 100644 --- a/BIPs/4269-W69/test/BIP-535.report.txt +++ b/BIPs/4269-W69/test/BIP-535.report.txt @@ -1,31 +1,13 @@ FILENAME: `BIPs/4269-W69/test/BIP-535.json` MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` -COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` +COMMIT: `ae088b4beb46018fb71670d841fa127dbbc89066` CHAIN(S): `mainnet` -TENDERLY: `[🟩 SUCCESS](https://www.tdly.co/shared/simulation/770a21ac-d4a2-4a47-a2f5-dbb464fa156a)` +TENDERLY: [`🟩 SUCCESS`](https://www.tdly.co/shared/simulation/832a081f-ab40-44b6-85c7-279af783371f) ``` +----------+-------------------------------------------------+------------------------------------------------+---------------------------+---------+----------+ | function | token_symbol | recipient | amount | bip | tx_index | +----------+-------------------------------------------------+------------------------------------------------+---------------------------+---------+----------+ +| transfer | USDC:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | N/A:0xDe5cbE25c58c49Ee7635216de6998f8dAcD63b96 | 4382.14 (RAW: 4382140000) | BIP-535 | 0 | | transfer | USDC:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | N/A:0xc4F95f674b393a49410acE864833abE836848526 | 4088.24 (RAW: 4088240000) | BIP-535 | 1 | +----------+-------------------------------------------------+------------------------------------------------+---------------------------+---------+----------+ ``` -FILENAME: `BIPs/4269-W69/test/BIP-535.json` -MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` -COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` -CHAIN(S): `mainnet` -TENDERLY: `[🟩 SUCCESS](https://www.tdly.co/shared/simulation/dc3460f7-79f2-4239-8170-94e59ab9e92b)` -``` -+----------+----------------------------------------------------------+-------+-------------------------------------------------------------------+------------+----------+ -| fx_name | to | value | inputs | bip_number | tx_index | -+----------+----------------------------------------------------------+-------+-------------------------------------------------------------------+------------+----------+ -| transfer | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 (tokens/USDC) | 0 | { | BIP-535 | N/A | -| | | | "to": [ | | | -| | | | "0xDe5cbE25c58c49Ee7635216de6998f8dAcD63b96 (N/A)" | | | -| | | | ], | | | -| | | | "value": [ | | | -| | | | "raw:4382140000, 18 decimals:4.38214E-9, 6 decimals: 4382.14" | | | -| | | | ] | | | -| | | | } | | | -+----------+----------------------------------------------------------+-------+-------------------------------------------------------------------+------------+----------+ -``` diff --git a/BIPs/4269-W69/test/BIP-536.report.txt b/BIPs/4269-W69/test/BIP-536.report.txt index e373b8d18..bf778e42f 100644 --- a/BIPs/4269-W69/test/BIP-536.report.txt +++ b/BIPs/4269-W69/test/BIP-536.report.txt @@ -1,8 +1,8 @@ FILENAME: `BIPs/4269-W69/test/BIP-536.json` MULTISIG: `multisigs/lm (mainnet:0xc38c5f97B34E175FFd35407fc91a937300E33860)` -COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` +COMMIT: `ae088b4beb46018fb71670d841fa127dbbc89066` CHAIN(S): `mainnet` -TENDERLY: `[🟥 FAILURE](https://www.tdly.co/shared/simulation/217d69cb-bb41-463d-b4c2-c06656f56e3d)` +TENDERLY: [`🟥 FAILURE`](https://www.tdly.co/shared/simulation/74aa0f95-3a5b-4be4-81fa-4f7dddb55e1a) ``` +-----------------------+---------------------------------------------------------------------+-----------------+--------------------------------------------+------------------------------------------------------------+--------------------------------------------+----------------+---------+----------+ | function | pool_id_and_address | symbol_and_info | gauge_address_and_info | tokens | rate_providers | review_summary | bip | tx_index | diff --git a/BIPs/4269-W69/test/BIP-537.report.txt b/BIPs/4269-W69/test/BIP-537.report.txt index ab4c2f70b..e967926e9 100644 --- a/BIPs/4269-W69/test/BIP-537.report.txt +++ b/BIPs/4269-W69/test/BIP-537.report.txt @@ -1,8 +1,8 @@ FILENAME: `BIPs/4269-W69/test/BIP-537.json` MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` -COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` +COMMIT: `ae088b4beb46018fb71670d841fa127dbbc89066` CHAIN(S): `mainnet` -TENDERLY: `[🟩 SUCCESS](https://www.tdly.co/shared/simulation/bc5eab6d-eb19-4914-84c9-eee5c85e650a)` +TENDERLY: [`🟩 SUCCESS`](https://www.tdly.co/shared/simulation/18cc3280-bb5b-4ef4-8219-a187a2110da1) ``` +----------+------------------------------------------------+---------------------------------------------------------+--------------------------------------+---------+----------+ | function | token_symbol | recipient | amount | bip | tx_index | diff --git a/BIPs/4269-W69/test/BIP-653.report.txt b/BIPs/4269-W69/test/BIP-653.report.txt index 9b00a9ae0..19595697a 100644 --- a/BIPs/4269-W69/test/BIP-653.report.txt +++ b/BIPs/4269-W69/test/BIP-653.report.txt @@ -1,23 +1,23 @@ FILENAME: `BIPs/4269-W69/test/BIP-653.json` MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` -COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` +COMMIT: `ae088b4beb46018fb71670d841fa127dbbc89066` CHAIN(S): `mainnet` -TENDERLY: `[🟨 PARTIAL](https://www.tdly.co/shared/simulation/e39c47a3-2a19-4e4d-88cb-188165be9093)` +TENDERLY: [`🟨 PARTIAL`](https://www.tdly.co/shared/simulation/ddddda96-0d69-4996-b624-52a31d1f1d32) ``` +-----------------------+---------------+--------------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------+---------+----------+ | function | caller_name | caller_address | fx_paths | action_ids | bip | tx_index | +-----------------------+---------------+--------------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------+---------+----------+ -| Authorizer/grantRole | multisigs/dao | 0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f | 20220325-mainnet-gauge-factory/LiquidityGaugeV5/set_reward_distributor(address,address) | 0xd0090a09f425bba74e6c801fba7c6d15b44147ab0bd319e40076ce07e95168b6 | BIP-653 | 0 | -| | | | 20220822-mainnet-gauge-factory-v2/LiquidityGaugeV5/set_reward_distributor(address,address) | | | | -| Authorizer/revokeRole | multisigs/dao | 0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f | 20220325-mainnet-gauge-factory/LiquidityGaugeV5/set_reward_distributor(address,address) | 0xd0090a09f425bba74e6c801fba7c6d15b44147ab0bd319e40076ce07e95168b6 | BIP-653 | 4 | -| | | | 20220822-mainnet-gauge-factory-v2/LiquidityGaugeV5/set_reward_distributor(address,address) | | | | +| Authorizer/grantRole | multisigs/dao | 0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f | 20220822-mainnet-gauge-factory-v2/LiquidityGaugeV5/set_reward_distributor(address,address) | 0xd0090a09f425bba74e6c801fba7c6d15b44147ab0bd319e40076ce07e95168b6 | BIP-653 | 0 | +| | | | 20220325-mainnet-gauge-factory/LiquidityGaugeV5/set_reward_distributor(address,address) | | | | +| Authorizer/revokeRole | multisigs/dao | 0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f | 20220822-mainnet-gauge-factory-v2/LiquidityGaugeV5/set_reward_distributor(address,address) | 0xd0090a09f425bba74e6c801fba7c6d15b44147ab0bd319e40076ce07e95168b6 | BIP-653 | 4 | +| | | | 20220325-mainnet-gauge-factory/LiquidityGaugeV5/set_reward_distributor(address,address) | | | | +-----------------------+---------------+--------------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------+---------+----------+ ``` FILENAME: `BIPs/4269-W69/test/BIP-653.json` MULTISIG: `multisigs/dao (mainnet:0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f)` -COMMIT: `0b60139b842ffd73c920b423bc64d59b76b6293c` +COMMIT: `ae088b4beb46018fb71670d841fa127dbbc89066` CHAIN(S): `mainnet` -TENDERLY: `[🟨 PARTIAL](https://www.tdly.co/shared/simulation/9300a969-2f27-43c0-8656-92f2296b2e10)` +TENDERLY: [`🟨 PARTIAL`](https://www.tdly.co/shared/simulation/6c8eb11c-6269-41c0-bcb9-e2d637f1af15) ``` +------------------------+-------------------------------------------------------------------------------+-------+---------------------------------------------------------------------------+------------+----------+ | fx_name | to | value | inputs | bip_number | tx_index |