-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update/nft methods #317
Open
smk762
wants to merge
33
commits into
dev
Choose a base branch
from
update/nft-methods
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update/nft methods #317
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
980458d
Update index.mdx
harsenyan3 34924cf
Update index.mdx
harsenyan3 7137071
Update index.mdx
harsenyan3 390a850
Update index.mdx
harsenyan3 37fa294
Update index.mdx
harsenyan3 eafec11
Update index.mdx
harsenyan3 7b8d674
Update index.mdx
harsenyan3 65ee467
Update index.mdx
harsenyan3 ebaad1b
Create index.mdx
harsenyan3 36b22f2
Merge branch 'dev' into dev
harsenyan3 689cc92
Update index.mdx
harsenyan3 6e825b8
Update index.mdx
harsenyan3 56025b5
Update index.mdx
harsenyan3 6e131c5
Update index.mdx
harsenyan3 394bc21
Merge pull request #270 from harsenyan3/dev
smk762 a4b89a1
update eth enable with tokens (and nfts)
smk762 5701bc4
updates `clear_nft_db` method
smk762 95f05cc
updates `update_nft` method
smk762 fb9fa71
updates `enable_nft` method
smk762 5938680
updates common structures doc for NFT methods
smk762 c1e72e9
update NFT overview doc
smk762 33bd70c
add error resp for refresh_nft_metadata
smk762 5135db0
update kdf postman collection
smk762 5ad918a
slugs, sidebar and linting for nft updates
smk762 cbd3a0d
proxy_auth -> komodo_proxy
smk762 c94efb9
proxy\_auth -> komodo\_proxy; set as optional
smk762 b88d44f
add error responses for update_nft
smk762 cf0d0e2
liniting, add missing comma
smk762 be90684
add missing line breaks
smk762 fe2be3a
add `use_trading_proto_v2` to setup config doc
smk762 ac4ed00
Merge branch 'dev' into update/nft-methods
smk762 f5f31df
[Bot] File and author data updated, validated and updated internal li…
smk762 6efdc05
Merge pull request #335 from KomodoPlatform/lint-fix-patches/update/n…
gcharang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,149 changes: 804 additions & 345 deletions
1,149
postman/collections/komodo_defi.postman_collection.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,6 +158,28 @@ The `EvmNode` object includes the following items for a given coin or token: | |
``` | ||
</CollapsibleSection> | ||
|
||
### SwapV2Contracts | ||
|
||
The `SwapV2Contracts` object includes the following items for a given coin or token: | ||
|
||
| Parameter | Type | Description | | ||
| ------------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------- | | ||
| maker\_swap\_v2\_contract | string | Address for the maker's new V2 swap smart contract. Must be provided if "use\_trading\_proto\_v2"is true in mm2 configuration | | ||
| taker\_swap\_v2\_contract | string | Address for the taker's new V2 swap smart contract. Must be provided if "use\_trading\_proto\_v2"is true in mm2 configuration | | ||
| nft\_maker\_swap\_v2\_contract | string | Address for the maker's new V2 NFT swap smart contract. Must be provided if "use\_trading\_proto\_v2"is true in mm2 configuration | | ||
| nft\_taker\_swap\_v2\_contract | string | Address for the taker's new V2 NFT swap smart contract. Must be provided if "use\_trading\_proto\_v2"is true in mm2 configuration | | ||
|
||
<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example"> | ||
```json | ||
{ | ||
"maker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE", | ||
"taker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE", | ||
"nft_maker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE", | ||
"nft_taker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nft_taker_swap_v2_contract also should be removed according to the comment above. |
||
} | ||
``` | ||
</CollapsibleSection> | ||
|
||
### TokensRequest | ||
|
||
The `TokensRequest` object includes the following items for a given coin or token: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
...ages/komodo-defi-framework/api/v20-dev/non_fungible_tokens/enable_nft/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
export const title = "Komodo DeFi Framework Method: Enable NFT"; | ||
export const description = | ||
"The enable_nft method allows you to activate NFT-like tokens on the platform."; | ||
|
||
# enable\_nft | ||
|
||
The 'enable\_nft' method activates NFT-like tokens on the platform, if the NFT network was already activated with the [enable\_eth\_with\_tokens](/komodo-defi-framework/api/v20/enable_eth_with_tokens/) method, but without the `nft_req` parameter. | ||
|
||
| parameter | Type | Description | | ||
| ------------------ | ------ | ------------------------------------------------------------------------------------------------ | | ||
| ticker | string | The ticker of the NFT network, with `NFT_` as a prefix. | | ||
| activation\_params | object | A standard [NftProvider](/komodo-defi-framework/api/common_structures/nfts/#nft-provider) object | | ||
|
||
<CodeGroup title="" tag="POST" label="enable_nft" mm2MethodDecorate="true"> | ||
```json | ||
{ | ||
"userpass": "RPC_UserP@SSW0RD", | ||
"method": "enable_nft", | ||
"mmrpc": "2.0", | ||
"params": { | ||
"ticker": "NFT_MATIC", | ||
"activation_params": { | ||
"provider": { | ||
"type": "Moralis", | ||
"info": { | ||
"url": "https://moralis-proxy.komodo.earth", | ||
"komodo_proxy": true | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
</CodeGroup> | ||
|
||
## Response | ||
|
||
```json | ||
{ | ||
"mmrpc": "2.0", | ||
"result": { | ||
"nfts": { | ||
"0xc28a19e9a663d966cf99532bdb1229df1b0e344b,1": { | ||
"token_address": "0xc28a19e9a663d966cf99532bdb1229df1b0e344b", | ||
"token_id": "1", | ||
"chain": "POLYGON", | ||
"contract_type": "ERC1155", | ||
"amount": "1" | ||
}, | ||
"0xd25f13e4ba534ef625c75b84934689194b7bd59e,14": { | ||
"token_address": "0xd25f13e4ba534ef625c75b84934689194b7bd59e", | ||
"token_id": "14", | ||
"chain": "POLYGON", | ||
"contract_type": "ERC721", | ||
"amount": "1" | ||
} | ||
}, | ||
"platform_coin": "MATIC" | ||
}, | ||
"id": null | ||
} | ||
``` | ||
|
||
## Error - Platform coin is not yet activated | ||
|
||
```json | ||
{ | ||
"mmrpc": "2.0", | ||
"error": "Platform coin MATIC is not activated", | ||
"error_path": "token.lp_coins", | ||
"error_trace": "token:126] lp_coins:2797]", | ||
"error_type": "PlatformCoinIsNotActivated", | ||
"error_data": "MATIC", | ||
"id": null | ||
} | ||
``` | ||
|
||
## Error - Token already activated | ||
|
||
```json | ||
{ | ||
"mmrpc": "2.0", | ||
"error": "Token NFT_MATIC is already activated", | ||
"error_path": "token", | ||
"error_trace": "token:119]", | ||
"error_type": "TokenIsAlreadyActivated", | ||
"error_data": "NFT_MATIC", | ||
"id": null | ||
} | ||
``` | ||
|
||
## Error - Token config not found in coins file | ||
|
||
```json | ||
{ | ||
"mmrpc": "2.0", | ||
"error": "Token NFT_TESTTT config is not found", | ||
"error_path": "token.prelude", | ||
"error_trace": "token:122] prelude:79]", | ||
"error_type": "TokenConfigIsNotFound", | ||
"error_data": "NFT_TESTTT", | ||
"id": null | ||
} | ||
``` |
2 changes: 1 addition & 1 deletion
2
...es/komodo-defi-framework/api/v20-dev/non_fungible_tokens/get_nft_list/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...omodo-defi-framework/api/v20-dev/non_fungible_tokens/get_nft_metadata/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...modo-defi-framework/api/v20-dev/non_fungible_tokens/get_nft_transfers/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
we dont have
nft taker smart contact
field in Komodo DeFi project and such solidity contract in Etomic Swap project.Right now we are focusing on Nft maker swap operations, where Maker is Nft owner.