-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-Fungible-Token #227
Comments
I use current standart for impliment it mint supply_max/amount 10000 near view arterra.testnet nft_token '{"token_id":"QmXnfHFhjnT19J2pfXjDydzhexpWvbuHaCr9a1X3mHsfZq:arterrateam.testnet"}' {
token_id: 'QmXnfHFhjnT19J2pfXjDydzhexpWvbuHaCr9a1X3mHsfZq:arterrateam.testnet',
owner_id: 'arterrateam.testnet',
supply: 9996,
metadata: {
title: "Programmer's lunch",
description: 'A limited series of representations of what some programmers fill their life cells with',
media: 'QmXnfHFhjnT19J2pfXjDydzhexpWvbuHaCr9a1X3mHsfZq',
copies: 10000,
supply_max: 10000
},
approved_account_ids: null,
metadata_id: 'QmXnfHFhjnT19J2pfXjDydzhexpWvbuHaCr9a1X3mHsfZq'
} near view arterra.testnet nft_token '{"token_id":"QmXnfHFhjnT19J2pfXjDydzhexpWvbuHaCr9a1X3mHsfZq:serhii-1205.testnet"}' {
token_id: 'QmXnfHFhjnT19J2pfXjDydzhexpWvbuHaCr9a1X3mHsfZq:serhii-1205.testnet',
owner_id: 'serhii-1205.testnet',
supply: 1,
metadata: {
title: "Programmer's lunch",
description: 'A limited series of representations of what some programmers fill their life cells with',
media: 'QmXnfHFhjnT19J2pfXjDydzhexpWvbuHaCr9a1X3mHsfZq',
copies: 10000,
supply_max: 10000
},
approved_account_ids: null,
metadata_id: 'QmXnfHFhjnT19J2pfXjDydzhexpWvbuHaCr9a1X3mHsfZq'
} |
Where are we standing on this? I think its a great idea. |
Is this going forward? |
@joshuajbouw The most recent update I am aware of is here: #246 (comment) |
Proposal for multi-fungible-token
In Ref Finance, we handle all swap pools in one contract, which means, when we release LP token for each pool, those tokens are exist in single contract, which can NOT be supported by current NEP-141 standard.
Now, based on NEP-141, actually we extended it to support multi-token in one contract, change some interfaces and leave the whole working process untouched.
Here is the way:
we change the following interface, add a heading 'm' to the name and, compare to the original one in NEP-141,
token_id: String
is added as first parameter of each interface:mft_resolve_transfer
in trait MFTTokenResolvermft_on_transfer
in trait MFTTokenReceivermft_transfer
mft_transfer_call
mft_metadata
, return the same FungibleTokenMetadata structure in NEP-141mft_register
mft_total_supply
mft_balance_of
When the value of this field equals to
predecessor_id
or the token contract id, the interface has the same behaviors with original one in NEP-141. Otherwise, the token_id stands for inner-index in the token contract.For detailed implementation, please see here
In this way, this protocol can handle both FT token and MFT token.
The text was updated successfully, but these errors were encountered: