-
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.
- Loading branch information
1 parent
a405722
commit 405ce0a
Showing
5 changed files
with
40 additions
and
758 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,28 @@ | ||
import { type Address, type Hex, keccak256, toHex } from 'viem'; | ||
|
||
// Delegation constants | ||
export const ANY_DELEGATE = | ||
'0x0000000000000000000000000000000000000a11' as Address; | ||
export const ROOT_AUTHORITY = | ||
'0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' as Hex; | ||
|
||
// Execution Modes | ||
export const BATCH_EXECUTION_MODE = [ | ||
'0x0100000000000000000000000000000000000000000000000000000000000000' as Hex, | ||
]; | ||
export const SINGLE_EXECUTION_MODE = [ | ||
'0x0000000000000000000000000000000000000000000000000000000000000000' as Hex, | ||
]; | ||
export const EMPTY_ARGS = '0x'; | ||
export const EMPTY_SIGNATURE = '0x'; | ||
export const SALT = BigInt(0); | ||
|
||
export const CAVEAT_TYPEHASH = keccak256( | ||
toHex('Caveat(address enforcer,bytes terms)'), | ||
); | ||
|
||
export const DELEGATION_TYPEHASH = keccak256( | ||
toHex( | ||
'Delegation(address delegate,address delegator,bytes32 authority,Caveat[] caveats,uint256 salt)Caveat(address enforcer,bytes terms)', | ||
), | ||
); |
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.