-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from hoanhan101/loaf
Loaf
- Loading branch information
Showing
10 changed files
with
139 additions
and
126 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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
tmp.* | ||
.env | ||
|
||
/target | ||
/target | ||
|
||
account | ||
keys |
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
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,33 @@ | ||
use starknet::ContractAddress; | ||
|
||
// LeetLoot interface | ||
#[starknet::interface] | ||
trait ILeetLoot<T> { | ||
// Ownership | ||
fn owner(self: @T) -> ContractAddress; | ||
fn transferOwnership(ref self: T, to: ContractAddress); | ||
fn renounceOwnership(ref self: T); | ||
|
||
// ERC721 | ||
fn name(self: @T) -> felt252; | ||
fn symbol(self: @T) -> felt252; | ||
fn balanceOf(self: @T, account: ContractAddress) -> u256; | ||
fn ownerOf(self: @T, tokenID: u256) -> ContractAddress; | ||
fn transferFrom(ref self: T, from: ContractAddress, to: ContractAddress, tokenID: u256); | ||
fn approve(ref self: T, to: ContractAddress, tokenID: u256); | ||
fn setApprovalForAll(ref self: T, operator: ContractAddress, approved: bool); | ||
fn getApproved(self: @T, tokenID: u256) -> ContractAddress; | ||
fn isApprovedForAll(self: @T, owner: ContractAddress, operator: ContractAddress) -> bool; | ||
|
||
// ERC165 | ||
fn supportsInterface(self: @T, interfaceId: felt252) -> bool; | ||
fn registerInterface(ref self: T, interface_id: felt252); | ||
|
||
// Core functions | ||
fn whitelist(ref self: T, to: ContractAddress); | ||
fn getWhitelist(self: @T) -> ContractAddress; | ||
fn mint(ref self: T, to: ContractAddress, beast: u8, prefix: u8, suffix: u8, level: felt252); | ||
fn isMinted(ref self: T, beast: u8, prefix: u8, suffix: u8) -> bool; | ||
fn tokenURI(self: @T, tokenID: u256) -> Array::<felt252>; | ||
fn tokenSupply(self: @T) -> u256; | ||
} |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
mod beast; | ||
mod loot; | ||
mod long_string; | ||
mod tests; | ||
mod interfaces; |
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
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 @@ | ||
mod deploy; |
Oops, something went wrong.