Skip to content

Commit

Permalink
Merge pull request #146 from CudoVentures/CUDOS-2076-Implement-missin…
Browse files Browse the repository at this point in the history
…g-TxMsgType-parsing

CUDOS-2076-Implement-missing-TxMsgType-parsing
  • Loading branch information
mlukanova authored Jan 31, 2023
2 parents 9afadde + 7639973 commit 9dee535
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ VITE_APP_LOCAL_STAKING_URL=''
VITE_APP_LOCAL_CHAIN_NAME=''
VITE_APP_LOCAL_CHAIN_ID=''

# DEV
VITE_APP_DEV_CAPTCHA_SITE_KEY=''
VITE_APP_DEV_FAUCET_ADDRESS=''
VITE_APP_DEV_BRIDGE_URL=''
VITE_APP_DEV_GRAPHQL_URL=''
VITE_APP_DEV_GRAPHQL_WS=''
VITE_APP_DEV_RPC=''
VITE_APP_DEV_API=''
VITE_APP_DEV_EXPLORER_URL=''
VITE_APP_DEV_STAKING_URL=''
VITE_APP_DEV_CHAIN_NAME=''
VITE_APP_DEV_CHAIN_ID=''

# PRIVATE
VITE_APP_PRIVATE_CAPTCHA_SITE_KEY=''
VITE_APP_PRIVATE_FAUCET_ADDRESS=''
Expand Down
87 changes: 85 additions & 2 deletions src/ledgers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const colors = {
cosmwasm: '#212c6f',
gravity: '#469990',
cudosNft: '#ff1493',
cudosAdmin: '#535da8'
cudosAdmin: '#535da8',
marketplace: '#BA0086',
addressbook: '#FF720C'
}

export const defaultMessages = {
Expand Down Expand Up @@ -440,7 +442,88 @@ export const defaultMessages = {
typeUrl: 'gravity.v1.MsgValsetUpdatedClaim',
color: colors.gravity,
displayName: 'Valset Updated Claim'
}
},
// ========================
// marketplace
// ========================
'/cudoventures.cudosnode.marketplace.MsgRemoveAdmin': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgRemoveAdmin',
color: colors.marketplace,
displayName: 'Remove Marketplace Admin'
},
'/cudoventures.cudosnode.marketplace.MsgBuyNft': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgBuyNft',
color: colors.marketplace,
displayName: 'Buy NFT'
},
'/cudoventures.cudosnode.marketplace.MsgUpdateRoyalties': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgUpdateRoyalties',
color: colors.marketplace,
displayName: 'Update NFT Royalties'
},
'/cudoventures.cudosnode.marketplace.MsgUpdatePrice': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgUpdatePrice',
color: colors.marketplace,
displayName: 'Update NFT Price'
},
'/cudoventures.cudosnode.marketplace.MsgRemoveNft': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgRemoveNft',
color: colors.marketplace,
displayName: 'Remove NFT from Sale'
},
'/cudoventures.cudosnode.marketplace.MsgPublishNft': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgPublishNft',
color: colors.marketplace,
displayName: 'Publish NFT for Sale'
},
'/cudoventures.cudosnode.marketplace.MsgMintNft': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgMintNft',
color: colors.marketplace,
displayName: 'Mint NFT'
},
'/cudoventures.cudosnode.marketplace.MsgAddAdmin': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgAddAdmin',
color: colors.marketplace,
displayName: 'Add Marketplace Admin'
},
'/cudoventures.cudosnode.marketplace.MsgUnverifyCollection': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgUnverifyCollection',
color: colors.marketplace,
displayName: 'Unverify NFT Collection'
},
'/cudoventures.cudosnode.marketplace.MsgVerifyCollection': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgVerifyCollection',
color: colors.marketplace,
displayName: 'Verify NFT Collection'
},
'/cudoventures.cudosnode.marketplace.MsgPublishCollection': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgPublishCollection',
color: colors.marketplace,
displayName: 'Publish NFT Collection'
},
'/cudoventures.cudosnode.marketplace.MsgCreateCollection': {
typeUrl: 'cudoventures.cudosnode.marketplace.MsgCreateCollection',
color: colors.marketplace,
displayName: 'Create NFT Collection'
},
// ========================
// addressbook
// ========================
'/cudoventures.cudosnode.addressbook.MsgDeleteAddress': {
typeUrl: 'cudoventures.cudosnode.addressbook.MsgDeleteAddress',
color: colors.addressbook,
displayName: 'Delete address'
},
'/cudoventures.cudosnode.addressbook.MsgUpdateAddress': {
typeUrl: 'cudoventures.cudosnode.addressbook.MsgUpdateAddress',
color: colors.addressbook,
displayName: 'Update address'
},
'/cudoventures.cudosnode.addressbook.MsgCreateAddress': {
typeUrl: 'cudoventures.cudosnode.addressbook.MsgCreateAddress',
color: colors.addressbook,
displayName: 'Create address'
},
}

export const unknownMessage = {
Expand Down
15 changes: 15 additions & 0 deletions src/utils/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,66 +4,77 @@ export const CHAIN_DETAILS = {
DEFAULT_NETWORK: import.meta.env.VITE_APP_DEFAULT_NETWORK || process.env.VITE_APP_DEFAULT_NETWORK || "",
CAPTCHA_SITE_KEY: {
LOCAL: import.meta.env.VITE_APP_LOCAL_CAPTCHA_SITE_KEY || process.env.VITE_APP_LOCAL_CAPTCHA_SITE_KEY || "",
DEV: import.meta.env.VITE_APP_DEV_CAPTCHA_SITE_KEY || process.env.VITE_APP_DEV_CAPTCHA_SITE_KEY || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_CAPTCHA_SITE_KEY || process.env.VITE_APP_PRIVATE_CAPTCHA_SITE_KEY || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_CAPTCHA_SITE_KEY || process.env.VITE_APP_PUBLIC_CAPTCHA_SITE_KEY || "",
MAINNET: ''
},
FAUCET_ADDRESS: {
LOCAL: import.meta.env.VITE_APP_LOCAL_FAUCET_ADDRESS || process.env.VITE_APP_LOCAL_FAUCET_ADDRESS || "",
DEV: import.meta.env.VITE_APP_DEV_FAUCET_ADDRESS || process.env.VITE_APP_DEV_FAUCET_ADDRESS || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_FAUCET_ADDRESS || process.env.VITE_APP_PRIVATE_FAUCET_ADDRESS || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_FAUCET_ADDRESS || process.env.VITE_APP_PUBLIC_FAUCET_ADDRESS || "",
MAINNET: ''
},
BRIDGE_URL: {
LOCAL: import.meta.env.VITE_APP_LOCAL_BRIDGE_URL || process.env.VITE_APP_LOCAL_BRIDGE_URL || "",
DEV: import.meta.env.VITE_APP_DEV_BRIDGE_URL || process.env.VITE_APP_DEV_BRIDGE_URL || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_BRIDGE_URL || process.env.VITE_APP_PRIVATE_BRIDGE_URL || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_BRIDGE_URL || process.env.VITE_APP_PUBLIC_BRIDGE_URL || "",
MAINNET: import.meta.env.VITE_APP_MAINNET_BRIDGE_URL || process.env.VITE_APP_MAINNET_BRIDGE_URL || "",
},
GRAPHQL_URL: {
LOCAL: import.meta.env.VITE_APP_LOCAL_GRAPHQL_URL || process.env.VITE_APP_LOCAL_GRAPHQL_URL || "",
DEV: import.meta.env.VITE_APP_DEV_GRAPHQL_URL || process.env.VITE_APP_DEV_GRAPHQL_URL || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_GRAPHQL_URL || process.env.VITE_APP_PRIVATE_GRAPHQL_URL || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_GRAPHQL_URL || process.env.VITE_APP_PUBLIC_GRAPHQL_URL || "",
MAINNET: import.meta.env.VITE_APP_MAINNET_GRAPHQL_URL || process.env.VITE_APP_MAINNET_GRAPHQL_URL || ""
},
GRAPHQL_WS: {
LOCAL: import.meta.env.VITE_APP_LOCAL_GRAPHQL_WS || process.env.VITE_APP_LOCAL_GRAPHQL_WS || "",
DEV: import.meta.env.VITE_APP_DEV_GRAPHQL_WS || process.env.VITE_APP_DEV_GRAPHQL_WS || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_GRAPHQL_WS || process.env.VITE_APP_PRIVATE_GRAPHQL_WS || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_GRAPHQL_WS || process.env.VITE_APP_PUBLIC_GRAPHQL_WS || "",
MAINNET: import.meta.env.VITE_APP_MAINNET_GRAPHQL_WS || process.env.VITE_APP_MAINNET_GRAPHQL_WS || ""
},
RPC_ADDRESS: {
LOCAL: import.meta.env.VITE_APP_LOCAL_RPC || process.env.VITE_APP_LOCAL_RPC || "",
DEV: import.meta.env.VITE_APP_DEV_RPC || process.env.VITE_APP_DEV_RPC || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_RPC || process.env.VITE_APP_PRIVATE_RPC || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_RPC || process.env.VITE_APP_PUBLIC_RPC || "",
MAINNET: import.meta.env.VITE_APP_MAINNET_RPC || process.env.VITE_APP_MAINNET_RPC || ""
},
API_ADDRESS: {
LOCAL: import.meta.env.VITE_APP_LOCAL_API || process.env.VITE_APP_LOCAL_API || "",
DEV: import.meta.env.VITE_APP_DEV_API || process.env.VITE_APP_DEV_API || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_API || process.env.VITE_APP_PRIVATE_API || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_API || process.env.VITE_APP_PUBLIC_API || "",
MAINNET: import.meta.env.VITE_APP_MAINNET_API || process.env.VITE_APP_MAINNET_API || ""
},
STAKING_URL: {
LOCAL: import.meta.env.VITE_APP_LOCAL_STAKING_URL || process.env.VITE_APP_LOCAL_STAKING_URL || "",
DEV: import.meta.env.VITE_APP_DEV_STAKING_URL || process.env.VITE_APP_DEV_STAKING_URL || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_STAKING_URL || process.env.VITE_APP_PRIVATE_STAKING_URL || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_STAKING_URL || process.env.VITE_APP_PUBLIC_STAKING_URL || "",
MAINNET: import.meta.env.VITE_APP_MAINNET_STAKING_URL || process.env.VITE_APP_MAINNET_STAKING_URL || ""
},
EXPLORER_URL: {
LOCAL: import.meta.env.VITE_APP_LOCAL_EXPLORER_URL || process.env.VITE_APP_LOCAL_EXPLORER_URL || "",
DEV: import.meta.env.VITE_APP_DEV_EXPLORER_URL || process.env.VITE_APP_DEV_EXPLORER_URL || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_EXPLORER_URL || process.env.VITE_APP_PRIVATE_EXPLORER_URL || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_EXPLORER_URL || process.env.VITE_APP_PUBLIC_EXPLORER_URL || "",
MAINNET: import.meta.env.VITE_APP_MAINNET_EXPLORER_URL || process.env.VITE_APP_MAINNET_EXPLORER_URL || ""
},
CHAIN_NAME: {
LOCAL: import.meta.env.VITE_APP_LOCAL_CHAIN_NAME || process.env.VITE_APP_LOCAL_CHAIN_NAME || "",
DEV: import.meta.env.VITE_APP_DEV_CHAIN_NAME || process.env.VITE_APP_DEV_CHAIN_NAME || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_CHAIN_NAME || process.env.VITE_APP_PRIVATE_CHAIN_NAME || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_CHAIN_NAME || process.env.VITE_APP_PUBLIC_CHAIN_NAME || "",
MAINNET: import.meta.env.VITE_APP_MAINNET_CHAIN_NAME || process.env.VITE_APP_MAINNET_CHAIN_NAME || ""
},
CHAIN_ID: {
LOCAL: import.meta.env.VITE_APP_LOCAL_CHAIN_ID || process.env.VITE_APP_LOCAL_CHAIN_ID || "",
DEV: import.meta.env.VITE_APP_DEV_CHAIN_ID || process.env.VITE_APP_DEV_CHAIN_ID || "",
PRIVATE: import.meta.env.VITE_APP_PRIVATE_CHAIN_ID || process.env.VITE_APP_PRIVATE_CHAIN_ID || "",
PUBLIC: import.meta.env.VITE_APP_PUBLIC_CHAIN_ID || process.env.VITE_APP_PUBLIC_CHAIN_ID || "",
MAINNET: import.meta.env.VITE_APP_MAINNET_CHAIN_ID || process.env.VITE_APP_MAINNET_CHAIN_ID || ""
Expand All @@ -72,6 +83,10 @@ export const CHAIN_DETAILS = {
ALIAS_NAME: 'Local Testnet',
SHORT_NAMES: ['local']
},
DEV: {
ALIAS_NAME: 'DEV Environment',
SHORT_NAMES: ['cudos-dev-test-network', 'dev-network']
},
PRIVATE: {
ALIAS_NAME: 'Private Testnet',
SHORT_NAMES: ['private', 'dev-test']
Expand Down

0 comments on commit 9dee535

Please sign in to comment.