Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build/XToken.tz
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
(pair (pair (pair (big_map %admins address string)
(big_map %ledger address (pair (map %allowances address nat) (nat %balance))))
(pair (big_map %lockingList address timestamp) (big_map %metadata string bytes)))
(pair (pair (address %owner) (big_map %token_metadata nat (pair nat (map string bytes))))
(pair (pair (address %owner)
(big_map %token_metadata nat (pair (nat %token_id) (map %token_info string bytes))))
(pair (nat %totalSupply) (big_map %whitelist address string)))) ;
code { LAMBDA
(pair address
Expand Down
5 changes: 4 additions & 1 deletion src/storage.ligo
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*
* All storage variables can be found here.
**************************************************************************************)
type token_info is map(string,bytes)
type token_id is nat

type account is record
balance : nat;
Expand All @@ -37,5 +39,6 @@ type storage is record
admins: big_map(address, string);
lockingList: big_map(address, timestamp);
metadata : big_map(string, bytes);
token_metadata : big_map(nat,(nat * map(string,bytes)));
token_metadata: big_map(nat, michelson_pair(token_id, "token_id", token_info, "token_info"));
end

5 changes: 2 additions & 3 deletions test/helpers/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ const originate = async (owner) => {

const tokenMetaDataFinal = MichelsonMap.fromLiteral({
0: {
0: 0,
1: tokenMetaData
token_id: 0,
token_info: tokenMetaData
}
})

const origination = await Tezos.contract.originate({
code,
storage: {
Expand Down