-
-
Notifications
You must be signed in to change notification settings - Fork 969
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: checkpoint * chore: format * wip: checkpoint * wip: checkpoint * chore: format * wip: checkpoint * wip: checkpoint * wip: format * wip: checkpoint * wip: checkpoint * wip: format * wip: tweaks * wip: docs * wip: checkpoint * wip: format * chore: tweaks * wip: checkpoint * wip: format * wip: checkpoint * wip: checkpoint * wip: format * wip: docs * wip: checkpoint * wip: format * wip: up * wip: tweak * wip: checkpoint * wip: tweaks * chore: tweak * wip: tweak contract * format * wip: transaction types * wip: estimateGas * wip: format * wip: tests * wip: docs * wip: docs * docs: wip * wip: docs * wip: docs * chore: changeset * types * test * test * format
- Loading branch information
Showing
97 changed files
with
5,063 additions
and
315 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,5 @@ | ||
--- | ||
"viem": minor | ||
--- | ||
|
||
**Experimental:** Added EIP-7702 Extension. [See Docs](https://viem.sh/experimental/eip7702) |
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,23 @@ | ||
// SPDX-License-Identifier: Unlicense | ||
pragma solidity ^0.8.13; | ||
|
||
contract BatchCallInvoker { | ||
struct Call { | ||
bytes data; | ||
address to; | ||
uint256 value; | ||
} | ||
|
||
event CallEmitted(address indexed to, uint256 value, bytes data); | ||
|
||
function execute(Call[] calldata calls) external payable { | ||
for (uint256 i = 0; i < calls.length; i++) { | ||
Call memory call = calls[i]; | ||
|
||
(bool success, ) = call.to.call{value: call.value}(call.data); | ||
require(success, "call reverted"); | ||
|
||
emit CallEmitted(call.to, call.value, call.data); | ||
} | ||
} | ||
} |
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,10 @@ | ||
// SPDX-License-Identifier: Unlicense | ||
pragma solidity ^0.8.13; | ||
|
||
contract Event { | ||
event MessageEmitted(address indexed to, uint256 value, bytes data); | ||
|
||
function execute() external payable { | ||
emit MessageEmitted(msg.sender, msg.value, msg.data); | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Oops, something went wrong.