Skip to content

Commit

Permalink
implement constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
idea404 committed Oct 13, 2022
1 parent 44b77a1 commit d295b6e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions examples/src/fungible-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,17 @@ import {

@NearBindgen({ requireInit: true })
export class FungibleToken {
accounts: LookupMap<string> = new LookupMap("a");
accountRegistrants: LookupMap<string> = new LookupMap("r");
accountDeposits: LookupMap<string> = new LookupMap("c");
totalSupply = "0";
accounts: LookupMap<string>;
accountRegistrants: LookupMap<string>;
accountDeposits: LookupMap<string>;
totalSupply: string;

constructor() {
this.accounts = new LookupMap("a");
this.accountRegistrants = new LookupMap("r");
this.accountDeposits = new LookupMap("d");
this.totalSupply = "0";
}

@initialize({})
init({ owner_id, total_supply }: { owner_id: string; total_supply: string }) {
Expand Down

0 comments on commit d295b6e

Please sign in to comment.