-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat(nft): enable eth with non fungible tokens #2049
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! first iteration focusing on only some codes
…s, struct update syntax, deserialize() method
linter fails in CI
May be we have different env in CI, will revert this change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR! Only 2 comments at this stage since the first comment will lead to a lot of changes that I would rather review the code after them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next review iteration! Still have one more iteration to go as I found this review is growing, please resolve conflicts also, there was a change in the web3 transport interface due to this #2058 .
mm2src/coins_activation/src/tendermint_with_assets_activation.rs
Outdated
Show resolved
Hide resolved
#[allow(clippy::result_large_err)] | ||
pub fn coin_conf_with_protocol<T: TryFromCoinProtocol>( | ||
ctx: &MmArc, | ||
coin: &str, | ||
) -> Result<(Json, T), MmError<CoinConfWithProtocolError>> { | ||
let conf = coin_conf(ctx, coin); | ||
let (conf, coin_protocol) = match Chain::from_nft_ticker(coin) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I was a bit wrong in suggesting not adding NFTs in coin configs, if moralis supported more EVM chains or we moved away from moralis for a web3 native implementation (if possible in the future), it would be easier to add new chains and their NFTs in config without requiring a PR in komodefi. I guess one way to do this in the future is to have a field in platform coin configuration for if they support NFT or not, and we enable global NFT using the platform ticker and append NFT_
prefix to it. This is not needed at all for now, but if it was requested in the future we can do it.
…upported yet!". Update CoinsContext inside update_nft_global_in_coins_ctx
507194a
to
7e98ae1
Compare
…e-tokens # Conflicts: # mm2src/coins/eth.rs # mm2src/coins/eth/v2_activation.rs # mm2src/coins_activation/src/erc20_token_activation.rs # mm2src/coins_activation/src/eth_with_token_activation.rs
Ive reverted the name of the |
We can leave the old name for now and rename it later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Only a few non-blockers!
* dev: feat(indexeddb): advanced cursor filtering impl (KomodoPlatform#2066) update dockerhub destination repository (KomodoPlatform#2082) feat(event streaming): configurable worker path, use SharedWorker (KomodoPlatform#2080) fix(hd_tests): fix test_hd_utxo_tx_history unit test (KomodoPlatform#2078) feat(network): improve efficiency of known peers handling (KomodoPlatform#2074) feat(nft): enable eth with non fungible tokens (KomodoPlatform#2049) feat(ETH transport & heartbeats): various enhancements/features (KomodoPlatform#2058)
This commit introduces the functionality to enable EVM based coin as a platform coin along with its associated Non-Fungible Tokens (NFTs) owned by user. It includes enable_nft implementation, which works same way as enable_erc20.
revert botched rebase This reverts commit bc89322.
This Pull Request introduces the functionality to enable EVM based coin as a platform coin along with its associated Non-Fungible Tokens (NFTs) owned by user.
Also PR includes
enable_nft
implementation, which works same way asenable_erc20
.Main Features:
enable_eth_with_tokens
PRC: now works for botherc20
andnfts
activation.enable_nft
RPC: re utilizesenable_token::<EthCoin>
function