Skip to content

Commit

Permalink
add utils and constants
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-fleming committed Apr 18, 2023
1 parent d671d4c commit e86bcd2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/openzeppelin/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod security;
mod token;
mod tests;
mod utils;
1 change: 1 addition & 0 deletions src/openzeppelin/utils.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod constants;
32 changes: 32 additions & 0 deletions src/openzeppelin/utils/constants.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// Interface ids
//

// ERC165
const IERC165_ID: u32 = 0x01ffc9a7_u32;
const INVALID_ID: u32 = 0xffffffff_u32;

// Account
const IACCOUNT_ID: u32 = 0xa66bd575_u32;

// ERC721
const IERC721_ID: u32 = 0x80ac58cd_u32;
const IERC721_RECEIVER_ID: u32 = 0x150b7a02_u32;
const IERC721_METADATA_ID: u32 = 0x5b5e139f_u32;
const IERC721_ENUMERABLE_ID: u32 = 0x780e9d63_u32;

// ERC1155
const IERC1155_ID: u32 = 0xd9b67a26_u32;
const IERC1155_METADATA_ID: u32 = 0x0e89341c_u32;
const IERC1155_RECEIVER_ID: u32 = 0x4e2312e0_u32;
const ON_ERC1155_RECEIVED_SELECTOR: u32 = 0xf23a6e61_u32;
const ON_ERC1155_BATCH_RECEIVED_SELECTOR: u32 = 0xbc197c81_u32;

// AccessControl
const IACCESSCONTROL_ID: u32 = 0x7965db0b_u32;

//
// Roles
//

const DEFAULT_ADMIN_ROLE: felt252 = 0x00;

0 comments on commit e86bcd2

Please sign in to comment.