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

Support testing of inline functions #473

Merged
merged 3 commits into from
Dec 13, 2024
Merged

Conversation

Lbqds
Copy link
Member

@Lbqds Lbqds commented Nov 26, 2024

No description provided.

@Lbqds Lbqds force-pushed the inline-function-testing branch 4 times, most recently from 0e05855 to 5f840e8 Compare December 10, 2024 08:41
@Lbqds Lbqds force-pushed the inline-function-testing branch from 5f840e8 to 489a28d Compare December 13, 2024 01:39
"name": "Add",
"bytecode": "0206124024404f407440a140af010002100205d34fbb20db1600160100020201000c0c0205d36a51f82d1600160100020200000202021805160016015f06160016015f075da00016002a16012aa100a000160016010e0dce000100020103040c0011d319adf50e1300641600130164170517041603d1a21601160216041605c118010104060015d3f6ce55a6130064160013016417051704160316021340c8ac1603d1a21601160216041605c118010201010003d320f98f621600b0",
"codeHash": "6a1f1415a68d55365e205b39e5418cd1f6fc8c2c7926d3662c77d69b55c92681",
"bytecode": "0206124024404f407440a140af010002020205d34fbb20db1600160100020201000c0c0205d36a51f82d1600160100020200000202021805160016015f06160016015f075da00016002a16012aa100a000160016010e0dce00010002010304060011d319adf50e1300641600130164170517041603d1a21601160216041605c118010104060015d3f6ce55a6130064160013016417051704160316021340c8ac1603d1a21601160216041605c118010201010003d320f98f621600b0",
Copy link
Member Author

Choose a reason for hiding this comment

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

"name": "Transact",
"bytecode": "03064027404e40674080408e409c010100010009d353dbb7aab413c40de0b6b3a7640000a9a00013c40de0b6b3a76400002aa10002010200010009d3a248861cb413c40de0b6b3a7640000a8a00013c40de0b6b3a76400002ba1000201010101000ad3bf2d01bdb4ce001600aca00116002aa1010201020101000ad35496306fb4ce001600aba00116002ba10102010000000103d3815a8d0da00002010000000103d3a51b051ca00102",
"codeHash": "85e3e9a803741af8e92bd43b1b07cde53f39b86cab0ef1a85bab12b10d691b55",
"bytecode": "03064027404e40674080408e409c010100000009d353dbb7aab413c40de0b6b3a7640000a9a00013c40de0b6b3a76400002aa10002010200000009d3a248861cb413c40de0b6b3a7640000a8a00013c40de0b6b3a76400002ba1000201010101000ad3bf2d01bdb4ce001600aca00116002aa1010201020101000ad35496306fb4ce001600aba00116002ba10102010000000103d3815a8d0da00002010000000103d3a51b051ca00102",
Copy link
Member Author

Choose a reason for hiding this comment

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

Same here

@Lbqds Lbqds force-pushed the inline-function-testing branch from 489a28d to 7138dfd Compare December 13, 2024 01:48
return await web3
.getCurrentNodeProvider()
.events.getEventsContractContractaddress(this.contractAddress, { start })
} catch (error) {
Copy link
Member Author

Choose a reason for hiding this comment

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

If one subscribes to events starting from index 0 when the contract has no events, the latest full node will directly return Contract events of contract-address not found. Additionally, calling getContractEventCount will also return the error Current events count for contract contract-address not found. To avoid making an additional call to getContractEventCount, a catch was added here to handle this error.

@Lbqds Lbqds requested review from polarker and h0ngcha0 December 13, 2024 01:56
Copy link
Member

@polarker polarker left a comment

Choose a reason for hiding this comment

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

LGTM

@polarker polarker merged commit f9aa8a2 into master Dec 13, 2024
6 of 7 checks passed
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.

2 participants