-
Notifications
You must be signed in to change notification settings - Fork 202
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(evm-precompile): Emit EVM events created to reflect the ABCI events that occur outside the EVM to make sure that block explorers and indexers can find indexed ABCI event information. #2125
Open
Unique-Divine
wants to merge
7
commits into
main
Choose a base branch
from
ud/evm-event
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7e7b52d
test(evm): more bank extension tests
Unique-Divine c28b170
chrore: changelog
Unique-Divine 24917dd
chore: TODO comments and revert blockGasMeter changes
Unique-Divine d2f836b
start ABCI event solidity
Unique-Divine fbb1a25
Merge branch 'main' into ud/evm-event
Unique-Divine 790b062
Merge branch 'main' into ud/evm-event
Unique-Divine 0711426
feat(evm-precompile):Emit EVM events created to reflect the ABCI even…
Unique-Divine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/jod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
x/evm/embeds/artifacts/contracts/NibiruEvmUtils.sol/INibiruEvm.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"_format": "hh-sol-artifact-1", | ||
"contractName": "INibiruEvm", | ||
"sourceName": "contracts/NibiruEvmUtils.sol", | ||
"abi": [ | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "string", | ||
"name": "eventType", | ||
"type": "string" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes", | ||
"name": "attrs", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "AbciEvent", | ||
"type": "event" | ||
} | ||
], | ||
"bytecode": "0x", | ||
"deployedBytecode": "0x", | ||
"linkReferences": {}, | ||
"deployedLinkReferences": {} | ||
} |
4 changes: 2 additions & 2 deletions
4
...ontracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...rtifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...acts/contracts/TestNativeSendThenPrecompileSend.sol/TestNativeSendThenPrecompileSend.json
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...ds/artifacts/contracts/TestPrecompileSelfCallRevert.sol/TestPrecompileSelfCallRevert.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.19; | ||
|
||
/// @notice Interface defining the AbciEvent for interoperability between | ||
/// Ethereum and the ABCI (Application Blockchain Interface). | ||
interface INibiruEvm { | ||
struct BankCoin { | ||
string denom; | ||
uint256 amount; | ||
} | ||
|
||
/// @notice Event emitted to in precompiled contracts to relay information | ||
/// from the ABCI to the EVM logs and indexers. Consumers of this event should | ||
/// decode the `attrs` parameter based on the `eventType` context. | ||
/// | ||
/// @param eventType An identifier type of the event, used for indexing. | ||
/// Event types indexable with CometBFT indexer are in snake case like | ||
/// "pending_ethereum_tx" or "message", while protobuf typed events use the | ||
/// proto message name as their event type (e.g. | ||
/// "eth.evm.v1.EventEthereumTx"). | ||
/// @param attrs Arbitrary data payload associated with the event, typically | ||
/// encoding state changes or metadata. | ||
event AbciEvent(string indexed eventType, bytes attrs); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance error handling in gen-embeds recipe
The recipe should handle common failure scenarios: