-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from reown-com/feat/create-6492
feat: create 6492 signature
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 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,16 @@ | ||
use alloy::{ | ||
primitives::{b256, Address, Bytes, B256}, | ||
sol_types::SolValue, | ||
}; | ||
|
||
pub const ERC6492_MAGIC_BYTES: B256 = | ||
b256!("6492649264926492649264926492649264926492649264926492649264926492"); | ||
|
||
pub fn create_erc6492_signature(factory: Address, factory_data: Bytes, signature: Bytes) -> Bytes { | ||
( | ||
(factory, factory_data, signature).abi_encode_params(), | ||
ERC6492_MAGIC_BYTES, | ||
) | ||
.abi_encode_packed() | ||
.into() | ||
} |
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