From 2798dad0139d580183f1530be4e2116353151d29 Mon Sep 17 00:00:00 2001 From: Xeonus Date: Wed, 20 Sep 2023 21:00:21 +0200 Subject: [PATCH 1/4] BIP-436: Allocate BAL Liquidity to Base & Arbitrum axlBAL/BAL pools for routing over Squid - Part A: Add axlBAL/BAL pool gauges for squid on Arbitrum and Base BIP-436A Tenderly sim: https://dashboard.tenderly.co/public/safe/safe-apps/simulator/7ca07889-339d-424f-a6a0-486fa65bba33 - Part B: Transfer 40000 BAL to LM multisig - BIP-436B: Tenderly-sim: https://dashboard.tenderly.co/public/safe/safe-apps/simulator/6c9552b3-2454-4c44-9cf5-e74b304e367d --- BIPs/2023-W38/BIP-436A.json | 65 +++++++++++++++++++++++++++++++++++++ BIPs/2023-W38/BIP-436B.json | 40 +++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 BIPs/2023-W38/BIP-436A.json create mode 100644 BIPs/2023-W38/BIP-436B.json diff --git a/BIPs/2023-W38/BIP-436A.json b/BIPs/2023-W38/BIP-436A.json new file mode 100644 index 000000000..079f38215 --- /dev/null +++ b/BIPs/2023-W38/BIP-436A.json @@ -0,0 +1,65 @@ +{ + "version": "1.0", + "chainId": "1", + "createdAt": 1695236194130, + "meta": { + "name": "Transactions Batch", + "description": "", + "txBuilderVersion": "1.16.2", + "createdFromSafeAddress": "0xc38c5f97B34E175FFd35407fc91a937300E33860", + "createdFromOwnerAddress": "", + "checksum": "0x2fbaa0caea9a000f8a84bdda1024c4f3ee9d8bc52621289798cd2a6fe1e30049" + }, + "transactions": [ + { + "to": "0x5DbAd78818D4c8958EfF2d5b95b28385A22113Cd", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { + "name": "gauge", + "type": "address", + "internalType": "address" + }, + { + "name": "gaugeType", + "type": "string", + "internalType": "string" + } + ], + "name": "addGauge", + "payable": false + }, + "contractInputsValues": { + "gauge": "0x67313e858fB87Cc4b30AD56b6B461D7450738950", + "gaugeType": "Base" + } + }, + { + "to": "0x5DbAd78818D4c8958EfF2d5b95b28385A22113Cd", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { + "name": "gauge", + "type": "address", + "internalType": "address" + }, + { + "name": "gaugeType", + "type": "string", + "internalType": "string" + } + ], + "name": "addGauge", + "payable": false + }, + "contractInputsValues": { + "gauge": "0x66E9A9d0a35C6a368A66A432AbD9dB4Fb248f212", + "gaugeType": "Arbitrum" + } + } + ] +} \ No newline at end of file diff --git a/BIPs/2023-W38/BIP-436B.json b/BIPs/2023-W38/BIP-436B.json new file mode 100644 index 000000000..2a635ece3 --- /dev/null +++ b/BIPs/2023-W38/BIP-436B.json @@ -0,0 +1,40 @@ +{ + "version": "1.0", + "chainId": "1", + "createdAt": 1695236356608, + "meta": { + "name": "Transactions Batch", + "description": "", + "txBuilderVersion": "1.16.2", + "createdFromSafeAddress": "0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f", + "createdFromOwnerAddress": "", + "checksum": "0x07a161f638471eb74468f6089e3fba601cb30357e0a2f4331a80df3e97143231" + }, + "transactions": [ + { + "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": "0xc38c5f97B34E175FFd35407fc91a937300E33860", + "amount": "40000000000000000000000" + } + } + ] +} \ No newline at end of file From c5444fb39b13aa2901623af768daa78a978aab91 Mon Sep 17 00:00:00 2001 From: Xeonus Date: Wed, 20 Sep 2023 19:05:02 +0000 Subject: [PATCH 2/4] Reformatted JSON files --- BIPs/2023-W38/BIP-436A.json | 126 ++++++++++++++++++------------------ BIPs/2023-W38/BIP-436B.json | 78 +++++++++++----------- 2 files changed, 102 insertions(+), 102 deletions(-) diff --git a/BIPs/2023-W38/BIP-436A.json b/BIPs/2023-W38/BIP-436A.json index 079f38215..d42415b7b 100644 --- a/BIPs/2023-W38/BIP-436A.json +++ b/BIPs/2023-W38/BIP-436A.json @@ -1,65 +1,65 @@ { - "version": "1.0", - "chainId": "1", - "createdAt": 1695236194130, - "meta": { - "name": "Transactions Batch", - "description": "", - "txBuilderVersion": "1.16.2", - "createdFromSafeAddress": "0xc38c5f97B34E175FFd35407fc91a937300E33860", - "createdFromOwnerAddress": "", - "checksum": "0x2fbaa0caea9a000f8a84bdda1024c4f3ee9d8bc52621289798cd2a6fe1e30049" + "version": "1.0", + "chainId": "1", + "createdAt": 1695236194130, + "meta": { + "name": "Transactions Batch", + "description": "", + "txBuilderVersion": "1.16.2", + "createdFromSafeAddress": "0xc38c5f97B34E175FFd35407fc91a937300E33860", + "createdFromOwnerAddress": "", + "checksum": "0x2fbaa0caea9a000f8a84bdda1024c4f3ee9d8bc52621289798cd2a6fe1e30049" + }, + "transactions": [ + { + "to": "0x5DbAd78818D4c8958EfF2d5b95b28385A22113Cd", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { + "name": "gauge", + "type": "address", + "internalType": "address" + }, + { + "name": "gaugeType", + "type": "string", + "internalType": "string" + } + ], + "name": "addGauge", + "payable": false + }, + "contractInputsValues": { + "gauge": "0x67313e858fB87Cc4b30AD56b6B461D7450738950", + "gaugeType": "Base" + } }, - "transactions": [ - { - "to": "0x5DbAd78818D4c8958EfF2d5b95b28385A22113Cd", - "value": "0", - "data": null, - "contractMethod": { - "inputs": [ - { - "name": "gauge", - "type": "address", - "internalType": "address" - }, - { - "name": "gaugeType", - "type": "string", - "internalType": "string" - } - ], - "name": "addGauge", - "payable": false - }, - "contractInputsValues": { - "gauge": "0x67313e858fB87Cc4b30AD56b6B461D7450738950", - "gaugeType": "Base" - } - }, - { - "to": "0x5DbAd78818D4c8958EfF2d5b95b28385A22113Cd", - "value": "0", - "data": null, - "contractMethod": { - "inputs": [ - { - "name": "gauge", - "type": "address", - "internalType": "address" - }, - { - "name": "gaugeType", - "type": "string", - "internalType": "string" - } - ], - "name": "addGauge", - "payable": false - }, - "contractInputsValues": { - "gauge": "0x66E9A9d0a35C6a368A66A432AbD9dB4Fb248f212", - "gaugeType": "Arbitrum" - } - } - ] -} \ No newline at end of file + { + "to": "0x5DbAd78818D4c8958EfF2d5b95b28385A22113Cd", + "value": "0", + "data": null, + "contractMethod": { + "inputs": [ + { + "name": "gauge", + "type": "address", + "internalType": "address" + }, + { + "name": "gaugeType", + "type": "string", + "internalType": "string" + } + ], + "name": "addGauge", + "payable": false + }, + "contractInputsValues": { + "gauge": "0x66E9A9d0a35C6a368A66A432AbD9dB4Fb248f212", + "gaugeType": "Arbitrum" + } + } + ] +} diff --git a/BIPs/2023-W38/BIP-436B.json b/BIPs/2023-W38/BIP-436B.json index 2a635ece3..fcaa2610a 100644 --- a/BIPs/2023-W38/BIP-436B.json +++ b/BIPs/2023-W38/BIP-436B.json @@ -1,40 +1,40 @@ { - "version": "1.0", - "chainId": "1", - "createdAt": 1695236356608, - "meta": { - "name": "Transactions Batch", - "description": "", - "txBuilderVersion": "1.16.2", - "createdFromSafeAddress": "0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f", - "createdFromOwnerAddress": "", - "checksum": "0x07a161f638471eb74468f6089e3fba601cb30357e0a2f4331a80df3e97143231" - }, - "transactions": [ - { - "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": "0xc38c5f97B34E175FFd35407fc91a937300E33860", - "amount": "40000000000000000000000" - } - } - ] -} \ No newline at end of file + "version": "1.0", + "chainId": "1", + "createdAt": 1695236356608, + "meta": { + "name": "Transactions Batch", + "description": "", + "txBuilderVersion": "1.16.2", + "createdFromSafeAddress": "0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f", + "createdFromOwnerAddress": "", + "checksum": "0x07a161f638471eb74468f6089e3fba601cb30357e0a2f4331a80df3e97143231" + }, + "transactions": [ + { + "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": "0xc38c5f97B34E175FFd35407fc91a937300E33860", + "amount": "40000000000000000000000" + } + } + ] +} From 60d1c5aefd77768fbdd82335ca7d1db428097e76 Mon Sep 17 00:00:00 2001 From: Tritium Date: Sat, 23 Sep 2023 23:57:47 +0200 Subject: [PATCH 3/4] Don't try checksumming a non address. --- action-scripts/brownie/scripts/report_gauges.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action-scripts/brownie/scripts/report_gauges.py b/action-scripts/brownie/scripts/report_gauges.py index d14eacb00..016cc8299 100644 --- a/action-scripts/brownie/scripts/report_gauges.py +++ b/action-scripts/brownie/scripts/report_gauges.py @@ -314,13 +314,15 @@ def _parse_transfer(transaction: dict, **kwargs) -> Optional[dict]: # Get input values token = Contract(transaction["to"]) recipient_address = transaction["contractInputsValues"].get("to") + if Web3.isAddress(recipient_address): + recipient_address = Web3.toChecksumAddress(recipient_address) raw_amount = ( transaction["contractInputsValues"].get("amount") or transaction["contractInputsValues"].get("value") ) amount = int(raw_amount) / 10 ** token.decimals() if raw_amount else "N/A" symbol = token.symbol() - recipient_name = ADDR_BOOK.reversebook.get(Web3.toChecksumAddress(recipient_address), "N/A") + recipient_name = ADDR_BOOK.reversebook.get(recipient_address, "N/A") return { "function": "transfer", "chain": chain_name.replace("-main", "") if chain_name else "mainnet", From 169455b3e0611f6966b5a287a0d4ced0034179ce Mon Sep 17 00:00:00 2001 From: Tritium-VLK Date: Sat, 23 Sep 2023 22:02:03 +0000 Subject: [PATCH 4/4] Reformatted JSON files --- BIPs/2023-W38/BIP-436A.report.txt | 16 ++++++++++++++++ BIPs/2023-W38/BIP-436B.report.txt | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 BIPs/2023-W38/BIP-436A.report.txt create mode 100644 BIPs/2023-W38/BIP-436B.report.txt diff --git a/BIPs/2023-W38/BIP-436A.report.txt b/BIPs/2023-W38/BIP-436A.report.txt new file mode 100644 index 000000000..3685c3532 --- /dev/null +++ b/BIPs/2023-W38/BIP-436A.report.txt @@ -0,0 +1,16 @@ +File name: BIPs/2023-W38/BIP-436A.json +COMMIT: `60d1c5aefd77768fbdd82335ca7d1db428097e76` +CHAIN(S): `arbitrum, base` +``` ++-----------------------+---------------------------------------------------------------------+---------------------------+--------------------------------------------+------------------------------------------------------------+-------------------------------------------------+---------+------------+ +| function | pool_id_and_address | symbol_and_info | gauge_address_and_info | tokens | rate_providers | bip | tx_index | ++=======================+=====================================================================+===========================+============================================+============================================================+=================================================+=========+============+ +| GaugeAdderV4/addGauge | 0x58f2110b61f97fd6b9200b038d92f17c722a5a3300000000000000000000004f | axlBAL/BAL | 0x67313e858fB87Cc4b30AD56b6B461D7450738950 | "axlBAL(0x11C1879227D463b60db18C17c20aE739aE8E961a)", | "0x0000000000000000000000000000000000000000", | BIP-436 | 0 | +| | pool_address: 0x58F2110B61F97fD6B9200b038d92f17c722A5A33 | fee: 0.05, a-factor: 5000 | Style: L0 sidechain, cap: 100.0% | "BAL(0x4158734D47Fc9692176B5085E0F52ee0Da5d47F1)", | "0x0000000000000000000000000000000000000000", | | | +| | | | | "axlBAL/BAL(0x58F2110B61F97fD6B9200b038d92f17c722A5A33)" | "0x0000000000000000000000000000000000000000" | | | ++-----------------------+---------------------------------------------------------------------+---------------------------+--------------------------------------------+------------------------------------------------------------+-------------------------------------------------+---------+------------+ +| GaugeAdderV4/addGauge | 0x3f09c77b19ad8bb527355ec32d5ce98421fec2e30000000000000000000004b2 | axlBAL/BAL | 0x66E9A9d0a35C6a368A66A432AbD9dB4Fb248f212 | "BAL(0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8)", | "0x0000000000000000000000000000000000000000", | BIP-436 | 1 | +| | pool_address: 0x3f09C77B19AD8Bb527355ec32d5ce98421fec2E3 | fee: 0.05, a-factor: 5000 | Style: L0 sidechain, cap: 100.0% | "axlBAL(0x11C1879227D463b60db18C17c20aE739aE8E961a)", | "0x0000000000000000000000000000000000000000", | | | +| | | | | "axlBAL/BAL(0x3f09C77B19AD8Bb527355ec32d5ce98421fec2E3)" | "0x0000000000000000000000000000000000000000" | | | ++-----------------------+---------------------------------------------------------------------+---------------------------+--------------------------------------------+------------------------------------------------------------+-------------------------------------------------+---------+------------+ +``` diff --git a/BIPs/2023-W38/BIP-436B.report.txt b/BIPs/2023-W38/BIP-436B.report.txt new file mode 100644 index 000000000..d4ceeada4 --- /dev/null +++ b/BIPs/2023-W38/BIP-436B.report.txt @@ -0,0 +1,10 @@ +File name: BIPs/2023-W38/BIP-436B.json +COMMIT: `60d1c5aefd77768fbdd82335ca7d1db428097e76` +CHAIN(S): `mainnet` +``` ++------------+------------------------------------------------+-------------+----------------------------------------+---------+------------+ +| function | token_symbol | recipient | amount | bip | tx_index | ++============+================================================+=============+========================================+=========+============+ +| transfer | BAL:0xba100000625a3754423978a60c9317c58a424e3D | N/A:None | 40000.0 (RAW: 40000000000000000000000) | BIP-436 | 0 | ++------------+------------------------------------------------+-------------+----------------------------------------+---------+------------+ +```