-
-
Notifications
You must be signed in to change notification settings - Fork 945
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
267 changed files
with
6,245 additions
and
1,232 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": patch | ||
--- | ||
|
||
Added ZKsync config to Abstract Testnet chain. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
"viem": minor | ||
--- | ||
|
||
Renamed "zkSync" to "ZKsync": | ||
- Context: "zkSync" was officially renamed to "ZKsync" a while ago. | ||
- Variable names: `zkSync` -> `zksync` (for simplicity and consistency between folder/file names and variables). | ||
- Types: `ZkSync` -> `Zksync`. | ||
- Old naming still remains in Viem, however is marked as `@deprecated` and will be removed in the next major release. | ||
|
||
Removed deprecated `zkSyncTestnet` chain. |
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,16 @@ | ||
--- | ||
"viem": minor | ||
--- | ||
|
||
Added ability for consumer (libraries built on top of Viem) to globally configure properties on `BaseError`. | ||
|
||
```ts | ||
import { setErrorConfig } from 'viem' | ||
|
||
setErrorConfig({ | ||
getDocsUrl({ name }) { | ||
return `https://examplelib.com?error=${name}` | ||
} | ||
version: '[email protected]' | ||
}) | ||
``` |
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.
Oops, something went wrong.