Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: support simple tuple argument #1472

Merged
merged 13 commits into from
Nov 6, 2024
Merged

Conversation

gosuto-inzasheru
Copy link
Collaborator

@gosuto-inzasheru gosuto-inzasheru commented Oct 28, 2024

closes #1168

Copy link
Contributor

github-actions bot commented Oct 28, 2024

FILENAME: BIPs/4269-W69/unit_test/data_type_casting/more_tuples.json
COMMIT: 5764604a606bb54b5d243af62bcd6967e20766e3

Validator Result
validate_contains_msig
validate_msig_in_address_book
validate_chain_specified
validate_file_has_bip ❌ (No BIP number found in file path BIPs/4269-W69/unit_test/data_type_casting/more_tuples.json)
validate_path_has_weekly_dir

FILENAME: BIPs/4269-W69/unit_test/data_type_casting/simple_tuple.json
COMMIT: 5764604a606bb54b5d243af62bcd6967e20766e3

Validator Result
validate_contains_msig
validate_msig_in_address_book
validate_chain_specified
validate_file_has_bip ❌ (No BIP number found in file path BIPs/4269-W69/unit_test/data_type_casting/simple_tuple.json)
validate_path_has_weekly_dir

Copy link
Contributor

github-actions bot commented Oct 28, 2024

FILENAME: BIPs/4269-W69/unit_test/data_type_casting/more_tuples.json
MULTISIG: multisigs/lm (mainnet:0xc38c5f97B34E175FFd35407fc91a937300E33860)
COMMIT: 5764604a606bb54b5d243af62bcd6967e20766e3
CHAIN(S): mainnet
TENDERLY: 🟪 SKIPPED (Web3ValidationError("\nCould not identify the intended function with name adoptSafeHarbor, positional arguments with type(s) ((str,str,str,str,str))and keyword arguments with type(s){}.\nFound 1 function(s) with the name adoptSafeHarbor: ['adoptSafeHarbor((string,(string,string)[],(address,(address,uint8,bytes)[],uint256)[],(uint256,uint256,bool,uint8,string),string))']\nFunction invocation failed due to no matching argument types."))

+-----------------+-------------------------------------------------------------------+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------+
| fx_name         | to                                                                | value | inputs                                                                                                                                                         | bip_number | tx_index |
+-----------------+-------------------------------------------------------------------+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------+
| adoptSafeHarbor | 0x8f72fcf695523A6FC7DD97EafDd7A083c386b7b6 (safe_harbor/registry) | 0     | {                                                                                                                                                              | N/A        |   N/A    |
|                 |                                                                   |       |   "details": [                                                                                                                                                 |            |          |
|                 |                                                                   |       |     "\"Balancer\"",                                                                                                                                            |            |          |
|                 |                                                                   |       |     "[[\"Telegram:Mikeisballin\"",                                                                                                                             |            |          |
|                 |                                                                   |       |     "\"MikeB-Strategy\"]]",                                                                                                                                    |            |          |
|                 |                                                                   |       |     "[[\"0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "1]",                                                                                                                                                      |            |          |
|                 |                                                                   |       |     "[\"0xaF23DC5983230E9eEAf93280e312e57539D098D0\"",                                                                                                         |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "42161]",                                                                                                                                                  |            |          |
|                 |                                                                   |       |     "[\"0x17b11FF13e2d7bAb2648182dFD1f1cfa0E4C7cf3\"",                                                                                                         |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "43114]",                                                                                                                                                  |            |          |
|                 |                                                                   |       |     "[\"0xC40DCFB13651e64C8551007aa57F9260827B6462\"",                                                                                                         |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "8453]",                                                                                                                                                   |            |          |
|                 |                                                                   |       |     "[\"0x4f22C2784Cbd2B24a172566491Ee73fee1A63c2e\"",                                                                                                         |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "252]",                                                                                                                                                    |            |          |
|                 |                                                                   |       |     "[\"0x2a5AEcE0bb9EfFD7608213AE1745873385515c18\"",                                                                                                         |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "100]",                                                                                                                                                    |            |          |
|                 |                                                                   |       |     "[\"0x4f22C2784Cbd2B24a172566491Ee73fee1A63c2e\"",                                                                                                         |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "34443]",                                                                                                                                                  |            |          |
|                 |                                                                   |       |     "[\"0x043f9687842771b3dF8852c1E9801DCAeED3f6bc\"",                                                                                                         |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "10]",                                                                                                                                                     |            |          |
|                 |                                                                   |       |     "[\"0xeE071f4B516F69a1603dA393CdE8e76C40E5Be85\"",                                                                                                         |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "137]",                                                                                                                                                    |            |          |
|                 |                                                                   |       |     "[\"0x2f237e7643a3bF6Ef265dd6FCBcd26a7Cc38dbAa\"",                                                                                                         |            |          |
|                 |                                                                   |       |     "[[\"0xBA12222222228d8Ba445958a75a0704d566BF2C8\"",                                                                                                        |            |          |
|                 |                                                                   |       |     "0",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"0x\"]]",                                                                                                                                                |            |          |
|                 |                                                                   |       |     "1101]]",                                                                                                                                                  |            |          |
|                 |                                                                   |       |     "[10",                                                                                                                                                     |            |          |
|                 |                                                                   |       |     "1000000",                                                                                                                                                 |            |          |
|                 |                                                                   |       |     "false",                                                                                                                                                   |            |          |
|                 |                                                                   |       |     "2",                                                                                                                                                       |            |          |
|                 |                                                                   |       |     "\"KYC&GlobalSanctionVerification.BalancerrequiresalleligiblewhitehatstoundergoKnowYourCustomer(KYC)verificationandbescreenedagainstglobalsanctionslists", |            |          |
|                 |                                                                   |       |     "includingOFAC",                                                                                                                                           |            |          |
|                 |                                                                   |       |     "UK",                                                                                                                                                      |            |          |
|                 |                                                                   |       |     "andEUregulations.Thisprocessensuresthatallbountyrecipientsarecompliantwithlegalandregulatorystandardsbeforequalifyingforpayment.\"]",                     |            |          |
|                 |                                                                   |       |     "\"https://bafybeiakxvysdvsvupqcibkpifugzwcnllzt2udjk3l4yhcix7dqxxqyp4.ipfs.w3s.link/agreement.pdf\""                                                      |            |          |
|                 |                                                                   |       |   ]                                                                                                                                                            |            |          |
|                 |                                                                   |       | }                                                                                                                                                              |            |          |
+-----------------+-------------------------------------------------------------------+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------+

FILENAME: BIPs/4269-W69/unit_test/data_type_casting/simple_tuple.json
MULTISIG: multisigs/lm (mode:0x9ff471F9f98F42E5151C7855fD1b5aa906b1AF7e)
COMMIT: 5764604a606bb54b5d243af62bcd6967e20766e3
CHAIN(S): mode
TENDERLY: 🟩 SUCCESS

+---------+---------------------------------------------------------------------------------------+-------+------------------------------------------------------+------------+----------+
| fx_name | to                                                                                    | value | inputs                                               | bip_number | tx_index |
+---------+---------------------------------------------------------------------------------------+-------+------------------------------------------------------+------------+----------+
| vote    | 0x2aA8A5C1Af4EA11A1f1F10f3b73cfB30419F77Fb (modeGovernance/mode8020BPTVotingContract) | 0     | {                                                    | N/A        |   N/A    |
|         |                                                                                       |       |   "_tokenId": [                                      |            |          |
|         |                                                                                       |       |     "98"                                             |            |          |
|         |                                                                                       |       |   ],                                                 |            |          |
|         |                                                                                       |       |   "_votes": [                                        |            |          |
|         |                                                                                       |       |     "1",                                             |            |          |
|         |                                                                                       |       |     "\"0x9ff471F9f98F42E5151C7855fD1b5aa906b1AF7e\"" |            |          |
|         |                                                                                       |       |   ]                                                  |            |          |
|         |                                                                                       |       | }                                                    |            |          |
+---------+---------------------------------------------------------------------------------------+-------+------------------------------------------------------+------------+----------+

@gosuto-inzasheru gosuto-inzasheru marked this pull request as draft October 29, 2024 04:15
@gosuto-inzasheru gosuto-inzasheru marked this pull request as ready for review October 29, 2024 12:15
@gosuto-inzasheru
Copy link
Collaborator Author

gosuto-inzasheru commented Oct 29, 2024

the simple tuple payload did not sim properly in tenderly before but does now:

nested tuples is another issue for later: #1475

Copy link
Collaborator

@Xeonus Xeonus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarification: is the simple_tuple usecase the standard one? Or do we need another "non-tuple" use-case to make sure simple payload reports don't break?

@gosuto-inzasheru
Copy link
Collaborator Author

@Xeonus "simple" as in non nested. for nested tuples i opened #1475

Copy link
Collaborator

@Xeonus Xeonus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test case coverage looks good. Works as intended for tuples

@gosuto-inzasheru gosuto-inzasheru merged commit 3eccb55 into main Nov 6, 2024
@gosuto-inzasheru gosuto-inzasheru deleted the issue1168/support_tuple branch November 6, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: bip report cannot handle arrayed tuple
2 participants