diff --git a/BIPs/2023-W38/BIP-433.json b/BIPs/2023-W38/BIP-433.json new file mode 100644 index 000000000..79a061055 --- /dev/null +++ b/BIPs/2023-W38/BIP-433.json @@ -0,0 +1,99 @@ +{ + "version": "1.0", + "chainId": "1", + "createdAt": 1695229450551, + "meta": { + "name": "Transactions Batch", + "description": "", + "txBuilderVersion": "1.16.2", + "createdFromSafeAddress": "0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f", + "createdFromOwnerAddress": "", + "checksum": "0x7f1ffb3aab169083c8160173973fcb29c13ebb0dd47b6ee3eb046a3fd449b3cd" + }, + "transactions": [ + { + "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ], + "name": "transfer", + "payable": false + }, + "contractInputsValues": { + "to": "0x166f54F44F271407f24AA1BE415a730035637325", + "value": "168770000000" + } + }, + { + "to": "0xba100000625a3754423978a60c9317c58a424e3D", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "name": "transfer", + "payable": false + }, + "contractInputsValues": { + "recipient": "0x166f54F44F271407f24AA1BE415a730035637325", + "amount": "31695000000000000000000" + } + }, + { + "to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "value": "20000000000000000000", + "data": null, + "contractMethod": { + "inputs": [], + "name": "deposit", + "payable": true + }, + "contractInputsValues": null + }, + { + "to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "transfer", + "payable": false + }, + "contractInputsValues": { + "dst": "0x166f54F44F271407f24AA1BE415a730035637325", + "wad": "20000000000000000000" + } + } + ] +} diff --git a/BIPs/2023-W38/BIP-433.report.txt b/BIPs/2023-W38/BIP-433.report.txt new file mode 100644 index 000000000..04d9ff3b8 --- /dev/null +++ b/BIPs/2023-W38/BIP-433.report.txt @@ -0,0 +1,24 @@ +File name: BIPs/2023-W38/BIP-433.json +COMMIT: `025df92fbcd20bab449a51d9a907393dbb6a2869` +CHAIN(S): `mainnet` +``` ++------------+-------------------------------------------------+---------------------------------------------------------------+----------------------------------------+---------+------------+ +| function | token_symbol | recipient | amount | bip | tx_index | ++============+=================================================+===============================================================+========================================+=========+============+ +| transfer | USDC:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | multisigs/maxi_ops:0x166f54F44F271407f24AA1BE415a730035637325 | 168770.0 (RAW: 168770000000) | BIP-433 | 0 | ++------------+-------------------------------------------------+---------------------------------------------------------------+----------------------------------------+---------+------------+ +| transfer | BAL:0xba100000625a3754423978a60c9317c58a424e3D | multisigs/maxi_ops:0x166f54F44F271407f24AA1BE415a730035637325 | 31695.0 (RAW: 31695000000000000000000) | BIP-433 | 1 | ++------------+-------------------------------------------------+---------------------------------------------------------------+----------------------------------------+---------+------------+ +| transfer | WETH:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 | multisigs/maxi_ops:0x166f54F44F271407f24AA1BE415a730035637325 | 20.0 (RAW: 20000000000000000000) | BIP-433 | 3 | ++------------+-------------------------------------------------+---------------------------------------------------------------+----------------------------------------+---------+------------+ +``` +File name: BIPs/2023-W38/BIP-433.json +COMMIT: `025df92fbcd20bab449a51d9a907393dbb6a2869` +CHAIN(S): `1` +``` ++-----------+----------------------------------------------------------+----------------------+----------+--------------+------------+ +| fx_name | to | value | inputs | bip_number | tx_index | ++===========+==========================================================+======================+==========+==============+============+ +| deposit | 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 (tokens/WETH) | 20000000000000000000 | "N/A" | BIP-433 | N/A | ++-----------+----------------------------------------------------------+----------------------+----------+--------------+------------+ +``` diff --git a/action-scripts/brownie/scripts/report_gauges.py b/action-scripts/brownie/scripts/report_gauges.py index 016cc8299..9cd63bace 100644 --- a/action-scripts/brownie/scripts/report_gauges.py +++ b/action-scripts/brownie/scripts/report_gauges.py @@ -313,12 +313,20 @@ def _parse_transfer(transaction: dict, **kwargs) -> Optional[dict]: network.connect(chain_name) # Get input values token = Contract(transaction["to"]) - recipient_address = transaction["contractInputsValues"].get("to") + recipient_address = ( + transaction["contractInputsValues"].get("to") + or transaction["contractInputsValues"].get("dst") + or transaction["contractInputsValues"].get("recipient") + ) if Web3.isAddress(recipient_address): recipient_address = Web3.toChecksumAddress(recipient_address) + else: + print("ERROR: can't find recipient address") + recipient_address = None raw_amount = ( transaction["contractInputsValues"].get("amount") or transaction["contractInputsValues"].get("value") + or transaction["contractInputsValues"].get("wad") ) amount = int(raw_amount) / 10 ** token.decimals() if raw_amount else "N/A" symbol = token.symbol() @@ -384,6 +392,8 @@ def parse_no_reports_report(all_reports: list[dict[str, dict]], files: list[dict civ_parsed = prettify_contract_inputs_values(chain_name, transaction["contractInputsValues"]) elif transaction.get("data"): civ_parsed = transaction["data"] + else: + civ_parsed = "N/A" no_reports.append({ "fx_name": transaction["contractMethod"]["name"], "to": f"{to} ({addr.reversebook.get(to, 'Not Found')})",