Hot answers tagged

1

Well, yes. If a transaction reverts, from the blockchain's state of view, it's like it never happened. No changes are stored. But the transaction is still visible off-chain, as a reverted transaction - but still no changes are stored, and this includes also event emittance. A reverted transaction is included in a block, so in that sense it's a regular ...


1

Yes. In fact that’s how the Chainlink nodes operate. When calling buildChainlinkRequest and sendChainlinkRequestTo In the any API call feature you are actually emitting events that chainlink nodes look for. You can modify this to have a node looo for your specific event, but you need to use a node that uses an ethLog initiator instead of runLog. Check out ...


1

Thanks Ismael! I solved it as two different way. one from my code and one from your help. from my code await ex.makeOrder(token.address, 100, {value : 200}); const eventFilter = ex.filters.Make(); const events = await ex.queryFilter(eventFilter, "latest"); const hash = events[0].args[0]; and from your help const tx = await ex....


1

I suggest to try OpenZeppelin test helpers. They have a check expectEvent that reads events from the transaction's receipt. In your case it should look like it("Make / Take order", async function () { const receipt = await ex.connect(add1).makeOrder(token.address, 100, {value : 100}); expectEvent(receipt, 'Make', { orderId: '<...


1

You can use the events methods exposed in the generated java wrappers. Generate the Java wrappers There are multiple ways to generate the wrappers like using the web3j-gradle-plugin, web3j-maven-plugin, web3j-cli... For the web3j-gradle-plugin, you should add the following line to your build.gradle file: plugins { id "org.web3j" version "4.8....


Only top voted, non community-wiki answers of a minimum length are eligible