Skip to content

Commit

Permalink
add: index count up on add new attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
dDeedev committed Sep 27, 2022
1 parent 916d038 commit 3bf66cf
Show file tree
Hide file tree
Showing 12 changed files with 228 additions and 183 deletions.
70 changes: 70 additions & 0 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30287,6 +30287,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/sixnft/evmsupport/address_binding/{ethAddress}/{nativeAddress}':
Expand Down Expand Up @@ -30738,6 +30748,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/sixnft/nftmngr/action_by_ref_id/{refId}':
Expand Down Expand Up @@ -31303,6 +31323,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/sixnft/nftmngr/nft_data/{nftSchemaCode}/{tokenId}':
Expand Down Expand Up @@ -32131,6 +32161,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/sixnft/nftmngr/nft_schema/{code}':
Expand Down Expand Up @@ -32885,6 +32925,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/sixnft/nftmngr/organization/{name}':
Expand Down Expand Up @@ -33481,6 +33531,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/sixnft/nftoracle/action_request/{id}':
Expand Down Expand Up @@ -33772,6 +33832,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/sixnft/nftoracle/mint_request/{id}':
Expand Down
2 changes: 1 addition & 1 deletion initiate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ ignite scaffold message performActionByAdmin nft_schema_code token_id action \


# Test create action
sixnftd tx nftmngr perform-action-by-admin buakaw1 1 use10percentdiscount --from alice --gas auto --gas-adjustment 1.5 --gas-prices 0.1stake
sixnftd tx nftmngr perform-action-by-nftadmin buakaw1 1 use10percentdiscount --from alice --gas auto --gas-adjustment 1.5 --gas-prices 0.1stake

# Create evm_support module

Expand Down
2 changes: 1 addition & 1 deletion retest_action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ read
echo "Value before action >>"
sixnftd query nftmngr show-nft-data buakaw1 1 --output json | jq '.nftData.onchain_attributes[] | select(.name=="percent_discount_10").number_attribute_value.value'

sixnftd tx nftmngr perform-action-by-admin buakaw1 1 use10percentdiscount --from alice --gas auto --gas-adjustment 1.5 --gas-prices 0.1stake -y
sixnftd tx nftmngr perform-action-by-nftadmin buakaw1 1 use10percentdiscount --from alice --gas auto --gas-adjustment 1.5 --gas-prices 0.1stake -y
echo "Value after action"
sixnftd query nftmngr show-nft-data buakaw1 1 --output json | jq '.nftData.onchain_attributes[] | select(.name=="percent_discount_10").number_attribute_value.value'
2 changes: 1 addition & 1 deletion scripts/menu_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ case $choice in
if [ -z "$schema_code" ]; then
schema_code=$default_schema_code
fi
sixnftd tx nftmngr perform-action-by-admin ${schema_code} ${token_id} ${action} --from alice --gas auto --gas-adjustment 1.5 --gas-prices 0.1stake -y
sixnftd tx nftmngr perform-action-by-nftadmin ${schema_code} ${token_id} ${action} --from alice --gas auto --gas-adjustment 1.5 --gas-prices 0.1stake -y
;;
5) echo "Set NFT Attribute"
read -p "Enter Schema Code: " schema_code
Expand Down
2 changes: 1 addition & 1 deletion scripts/menu_testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ case $choice in
if [ -z "$schema_code" ]; then
schema_code=$default_schema_code
fi
sixnftd tx nftmngr perform-action-by-admin ${schema_code} ${token_id} ${action} --from alice --gas auto --gas-adjustment 1.5 --gas-prices 0.1stake -y --node http://sixnft.fivenet.sixprotocol.net:26657
sixnftd tx nftmngr perform-action-by-nftadmin ${schema_code} ${token_id} ${action} --from alice --gas auto --gas-adjustment 1.5 --gas-prices 0.1stake -y --node http://sixnft.fivenet.sixprotocol.net:26657
;;
5) echo "Set NFT Attribute"
read -p "Enter Schema Code: " schema_code
Expand Down
70 changes: 9 additions & 61 deletions vue/src/store/generated/index.ts
Original file line number Diff line number Diff line change
@@ -1,68 +1,16 @@
// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY.

import CosmosCosmosSdkCosmosAuthV1Beta1 from './cosmos/cosmos-sdk/cosmos.auth.v1beta1'
import CosmosCosmosSdkCosmosBankV1Beta1 from './cosmos/cosmos-sdk/cosmos.bank.v1beta1'
import CosmosCosmosSdkCosmosBaseTendermintV1Beta1 from './cosmos/cosmos-sdk/cosmos.base.tendermint.v1beta1'
import CosmosCosmosSdkCosmosCrisisV1Beta1 from './cosmos/cosmos-sdk/cosmos.crisis.v1beta1'
import CosmosCosmosSdkCosmosDistributionV1Beta1 from './cosmos/cosmos-sdk/cosmos.distribution.v1beta1'
import CosmosCosmosSdkCosmosEvidenceV1Beta1 from './cosmos/cosmos-sdk/cosmos.evidence.v1beta1'
import CosmosCosmosSdkCosmosFeegrantV1Beta1 from './cosmos/cosmos-sdk/cosmos.feegrant.v1beta1'
import CosmosCosmosSdkCosmosGovV1Beta1 from './cosmos/cosmos-sdk/cosmos.gov.v1beta1'
import CosmosCosmosSdkCosmosMintV1Beta1 from './cosmos/cosmos-sdk/cosmos.mint.v1beta1'
import CosmosCosmosSdkCosmosParamsV1Beta1 from './cosmos/cosmos-sdk/cosmos.params.v1beta1'
import CosmosCosmosSdkCosmosSlashingV1Beta1 from './cosmos/cosmos-sdk/cosmos.slashing.v1beta1'
import CosmosCosmosSdkCosmosStakingV1Beta1 from './cosmos/cosmos-sdk/cosmos.staking.v1beta1'
import CosmosCosmosSdkCosmosTxV1Beta1 from './cosmos/cosmos-sdk/cosmos.tx.v1beta1'
import CosmosCosmosSdkCosmosUpgradeV1Beta1 from './cosmos/cosmos-sdk/cosmos.upgrade.v1beta1'
import CosmosCosmosSdkCosmosVestingV1Beta1 from './cosmos/cosmos-sdk/cosmos.vesting.v1beta1'
import CosmosIbcGoIbcApplicationsTransferV1 from './cosmos/ibc-go/ibc.applications.transfer.v1'
import CosmosIbcGoIbcCoreChannelV1 from './cosmos/ibc-go/ibc.core.channel.v1'
import CosmosIbcGoIbcCoreClientV1 from './cosmos/ibc-go/ibc.core.client.v1'
import CosmosIbcGoIbcCoreConnectionV1 from './cosmos/ibc-go/ibc.core.connection.v1'
import CosmosIbcGoIbcCorePortV1 from './cosmos/ibc-go/ibc.core.port.v1'
import SixnftSixnftAdmin from './sixnft/sixnft.admin'
import SixnftSixnftEvmsupport from './sixnft/sixnft.evmsupport'
import SixnftSixnftNftmngr from './sixnft/sixnft.nftmngr'
import SixnftSixnftNftoracle from './sixnft/sixnft.nftoracle'
import SixnftSixnftTest from './sixnft/sixnft.test'
import ThesixnetworkSixnftSixnftAdmin from './thesixnetwork/sixnft/sixnft.admin'
import ThesixnetworkSixnftSixnftEvmsupport from './thesixnetwork/sixnft/sixnft.evmsupport'
import ThesixnetworkSixnftSixnftNftadmin from './thesixnetwork/sixnft/sixnft.nftadmin'
import ThesixnetworkSixnftSixnftNftmngr from './thesixnetwork/sixnft/sixnft.nftmngr'
import ThesixnetworkSixnftSixnftNftoracle from './thesixnetwork/sixnft/sixnft.nftoracle'
import SixnftEvmsupport from './sixnft.evmsupport'
import SixnftNftadmin from './sixnft.nftadmin'
import SixnftNftmngr from './sixnft.nftmngr'
import SixnftNftoracle from './sixnft.nftoracle'


export default {
CosmosCosmosSdkCosmosAuthV1Beta1: load(CosmosCosmosSdkCosmosAuthV1Beta1, 'cosmos.auth.v1beta1'),
CosmosCosmosSdkCosmosBankV1Beta1: load(CosmosCosmosSdkCosmosBankV1Beta1, 'cosmos.bank.v1beta1'),
CosmosCosmosSdkCosmosBaseTendermintV1Beta1: load(CosmosCosmosSdkCosmosBaseTendermintV1Beta1, 'cosmos.base.tendermint.v1beta1'),
CosmosCosmosSdkCosmosCrisisV1Beta1: load(CosmosCosmosSdkCosmosCrisisV1Beta1, 'cosmos.crisis.v1beta1'),
CosmosCosmosSdkCosmosDistributionV1Beta1: load(CosmosCosmosSdkCosmosDistributionV1Beta1, 'cosmos.distribution.v1beta1'),
CosmosCosmosSdkCosmosEvidenceV1Beta1: load(CosmosCosmosSdkCosmosEvidenceV1Beta1, 'cosmos.evidence.v1beta1'),
CosmosCosmosSdkCosmosFeegrantV1Beta1: load(CosmosCosmosSdkCosmosFeegrantV1Beta1, 'cosmos.feegrant.v1beta1'),
CosmosCosmosSdkCosmosGovV1Beta1: load(CosmosCosmosSdkCosmosGovV1Beta1, 'cosmos.gov.v1beta1'),
CosmosCosmosSdkCosmosMintV1Beta1: load(CosmosCosmosSdkCosmosMintV1Beta1, 'cosmos.mint.v1beta1'),
CosmosCosmosSdkCosmosParamsV1Beta1: load(CosmosCosmosSdkCosmosParamsV1Beta1, 'cosmos.params.v1beta1'),
CosmosCosmosSdkCosmosSlashingV1Beta1: load(CosmosCosmosSdkCosmosSlashingV1Beta1, 'cosmos.slashing.v1beta1'),
CosmosCosmosSdkCosmosStakingV1Beta1: load(CosmosCosmosSdkCosmosStakingV1Beta1, 'cosmos.staking.v1beta1'),
CosmosCosmosSdkCosmosTxV1Beta1: load(CosmosCosmosSdkCosmosTxV1Beta1, 'cosmos.tx.v1beta1'),
CosmosCosmosSdkCosmosUpgradeV1Beta1: load(CosmosCosmosSdkCosmosUpgradeV1Beta1, 'cosmos.upgrade.v1beta1'),
CosmosCosmosSdkCosmosVestingV1Beta1: load(CosmosCosmosSdkCosmosVestingV1Beta1, 'cosmos.vesting.v1beta1'),
CosmosIbcGoIbcApplicationsTransferV1: load(CosmosIbcGoIbcApplicationsTransferV1, 'ibc.applications.transfer.v1'),
CosmosIbcGoIbcCoreChannelV1: load(CosmosIbcGoIbcCoreChannelV1, 'ibc.core.channel.v1'),
CosmosIbcGoIbcCoreClientV1: load(CosmosIbcGoIbcCoreClientV1, 'ibc.core.client.v1'),
CosmosIbcGoIbcCoreConnectionV1: load(CosmosIbcGoIbcCoreConnectionV1, 'ibc.core.connection.v1'),
CosmosIbcGoIbcCorePortV1: load(CosmosIbcGoIbcCorePortV1, 'ibc.core.port.v1'),
SixnftSixnftAdmin: load(SixnftSixnftAdmin, 'sixnft.admin'),
SixnftSixnftEvmsupport: load(SixnftSixnftEvmsupport, 'sixnft.evmsupport'),
SixnftSixnftNftmngr: load(SixnftSixnftNftmngr, 'sixnft.nftmngr'),
SixnftSixnftNftoracle: load(SixnftSixnftNftoracle, 'sixnft.nftoracle'),
SixnftSixnftTest: load(SixnftSixnftTest, 'sixnft.test'),
ThesixnetworkSixnftSixnftAdmin: load(ThesixnetworkSixnftSixnftAdmin, 'sixnft.admin'),
ThesixnetworkSixnftSixnftEvmsupport: load(ThesixnetworkSixnftSixnftEvmsupport, 'sixnft.evmsupport'),
ThesixnetworkSixnftSixnftNftadmin: load(ThesixnetworkSixnftSixnftNftadmin, 'sixnft.nftadmin'),
ThesixnetworkSixnftSixnftNftmngr: load(ThesixnetworkSixnftSixnftNftmngr, 'sixnft.nftmngr'),
ThesixnetworkSixnftSixnftNftoracle: load(ThesixnetworkSixnftSixnftNftoracle, 'sixnft.nftoracle'),
SixnftEvmsupport: load(SixnftEvmsupport, 'sixnft.evmsupport'),
SixnftNftadmin: load(SixnftNftadmin, 'sixnft.nftadmin'),
SixnftNftmngr: load(SixnftNftmngr, 'sixnft.nftmngr'),
SixnftNftoracle: load(SixnftNftoracle, 'sixnft.nftoracle'),

}

Expand All @@ -82,4 +30,4 @@ function load(mod, fullns) {
})
}
}
}
}
19 changes: 14 additions & 5 deletions vue/src/store/generated/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
{
"name": "thesixnetwork-sixnft-js",
"version": "0.1.0",
"description": "Autogenerated cosmos modules vuex store",
"author": "Starport Codegen <hello@tendermint.com>",
"name": "thesixnetwork-sixnft-vue",
"version": "0.0.1",
"description": "Autogenerated Vue Utils",
"author": "Ignite Codegen <hello@ignite.com>",
"license": "Apache-2.0",
"licenses": [
{
"type": "Apache-2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
],
"main": "index.js",
"main": "index.ts",
"publishConfig": {
"access": "public"
},
"dependencies": {
"thesixnetwork-sixnft-client": "0.0.1",
"buffer": "^6.0.3"
},
"peerDependencies": {
"@cosmjs/proto-signing": "0.27.0",
"@cosmjs/stargate": "0.27.0",
"vue": "3.2.31"
}
}
48 changes: 24 additions & 24 deletions vue/src/store/generated/sixnft.nftadmin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,16 @@ export default {
},


async sendMsgRevokePermission({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgMint({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const client=await initClient(rootGetters)
const result = await client.SixnftNftadmin.tx.sendMsgRevokePermission({ value, fee: {amount: fee, gas: "200000"}, memo })
const result = await client.SixnftNftadmin.tx.sendMsgMint({ value, fee: {amount: fee, gas: "200000"}, memo })
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgRevokePermission:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgRevokePermission:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgMint:Send Could not broadcast Tx: '+ e.message)
}
}
},
Expand All @@ -189,43 +189,43 @@ export default {
}
}
},
async sendMsgMint({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgBurn({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const client=await initClient(rootGetters)
const result = await client.SixnftNftadmin.tx.sendMsgMint({ value, fee: {amount: fee, gas: "200000"}, memo })
const result = await client.SixnftNftadmin.tx.sendMsgBurn({ value, fee: {amount: fee, gas: "200000"}, memo })
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgMint:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgBurn:Send Could not broadcast Tx: '+ e.message)
}
}
},
async sendMsgBurn({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgRevokePermission({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const client=await initClient(rootGetters)
const result = await client.SixnftNftadmin.tx.sendMsgBurn({ value, fee: {amount: fee, gas: "200000"}, memo })
const result = await client.SixnftNftadmin.tx.sendMsgRevokePermission({ value, fee: {amount: fee, gas: "200000"}, memo })
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgRevokePermission:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgBurn:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgRevokePermission:Send Could not broadcast Tx: '+ e.message)
}
}
},

async MsgRevokePermission({ rootGetters }, { value }) {
async MsgMint({ rootGetters }, { value }) {
try {
const client=initClient(rootGetters)
const msg = await client.SixnftNftadmin.tx.msgRevokePermission({value})
const msg = await client.SixnftNftadmin.tx.msgMint({value})
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgRevokePermission:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgRevokePermission:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgMint:Create Could not create message: ' + e.message)
}
}
},
Expand All @@ -242,29 +242,29 @@ export default {
}
}
},
async MsgMint({ rootGetters }, { value }) {
async MsgBurn({ rootGetters }, { value }) {
try {
const client=initClient(rootGetters)
const msg = await client.SixnftNftadmin.tx.msgMint({value})
const msg = await client.SixnftNftadmin.tx.msgBurn({value})
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgMint:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgBurn:Create Could not create message: ' + e.message)
}
}
},
async MsgBurn({ rootGetters }, { value }) {
async MsgRevokePermission({ rootGetters }, { value }) {
try {
const client=initClient(rootGetters)
const msg = await client.SixnftNftadmin.tx.msgBurn({value})
const msg = await client.SixnftNftadmin.tx.msgRevokePermission({value})
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgRevokePermission:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgBurn:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgRevokePermission:Create Could not create message: ' + e.message)
}
}
},
Expand Down
Loading

0 comments on commit 3bf66cf

Please sign in to comment.