Skip to content

Commit

Permalink
start at token id 1 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
loothero authored Nov 8, 2023
1 parent 5482e51 commit cf53b04
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/beasts.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ mod Beasts {
_genesis_mint: bool,
}

const START_TOKEN_ID: u8 = 1;

#[event]
#[derive(Drop, starknet::Event)]
enum Event {
Expand Down Expand Up @@ -90,6 +92,7 @@ mod Beasts {
symbol: felt252
) {
self.initializer(owner, whitelist, name, symbol);
self._tokenIndex.write(START_TOKEN_ID.into());
}

#[generate_trait]
Expand Down Expand Up @@ -363,11 +366,11 @@ mod Beasts {


fn tokenSupply(self: @ContractState) -> u256 {
self._tokenIndex.read()
self._tokenIndex.read() - START_TOKEN_ID.into()
}

fn token_supply(self: @ContractState) -> u256 {
self._tokenIndex.read()
self._tokenIndex.read() - START_TOKEN_ID.into()
}

fn mintGenesisBeasts(ref self: ContractState, to: ContractAddress) {
Expand Down

0 comments on commit cf53b04

Please sign in to comment.