-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(evm-precompile): Emit EVM events created to reflect the ABCI eve…
…nts that occur outside the EVM to make sure that block explorers and indexers can find indexed ABCI event information. (#2125) * test(evm): more bank extension tests * chrore: changelog * chore: TODO comments and revert blockGasMeter changes * start ABCI event solidity * 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. * fix: use event log parsing rules from geth/.../abi/bind Go bindings and fix msg_server gas * wip!: checkpoint on ABI-less data field in event log * fix: use event log parsing rules from geth/.../abi/bind Go bindings
- Loading branch information
1 parent
1a256f2
commit 666a58d
Showing
20 changed files
with
497 additions
and
85 deletions.
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": "string", | ||
"name": "abciEvent", | ||
"type": "string" | ||
} | ||
], | ||
"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 abciEvent JSON object string with the event type and fields of an | ||
/// ABCI event. | ||
event AbciEvent(string indexed eventType, string abciEvent); | ||
} |
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.