-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1346a4b
commit f052da8
Showing
6 changed files
with
688 additions
and
685 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
import { createStore } from 'vuex'; | ||
import network from "./modules/network"; | ||
import user from "./modules/user"; | ||
import punk from "./modules/punk"; | ||
import tld from "./modules/tld"; | ||
|
||
import { createStore } from 'vuex' | ||
import network from './modules/network' | ||
import user from './modules/user' | ||
import punk from './modules/punk' | ||
import tld from './modules/tld' | ||
|
||
const store = createStore({ | ||
modules: { | ||
network, | ||
user, | ||
punk, | ||
tld | ||
} | ||
modules: { | ||
network, | ||
user, | ||
punk, | ||
tld, | ||
}, | ||
}) | ||
|
||
export default store; | ||
export default store |
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 |
---|---|---|
@@ -1,80 +1,77 @@ | ||
import { useEthers } from 'vue-dapp'; | ||
import tokens from "../../abi/tokens.json"; | ||
import { useEthers } from 'vue-dapp' | ||
import tokens from '../../abi/tokens.json' | ||
|
||
const { chainId } = useEthers(); | ||
const { chainId } = useEthers() | ||
|
||
export default { | ||
namespaced: true, | ||
|
||
state: () => ({ | ||
networkCurrency: "ETH", | ||
networkName: "Unsupported Network", | ||
supportedNetworks: { | ||
34443: "Mode" | ||
} | ||
}), | ||
|
||
getters: { | ||
getBlockExplorerBaseUrl() { | ||
// TODO | ||
return "https://explorer.mode.network/"; | ||
}, | ||
|
||
getChainId() { | ||
return chainId.value; | ||
}, | ||
|
||
getNetworkCurrency(state) { | ||
return state.networkCurrency; | ||
}, | ||
|
||
getNetworkName(state) { | ||
const supportedIds = Object.keys(state.supportedNetworks); | ||
|
||
if (supportedIds && supportedIds.includes(String(chainId.value))) { | ||
return state.networkName; | ||
} | ||
|
||
return "Unsupported Network"; | ||
}, | ||
|
||
getSupportedNetworks(state) { | ||
return state.supportedNetworks; | ||
}, | ||
|
||
getSupportedNetworkIds(state) { | ||
return Object.keys(state.supportedNetworks); | ||
}, | ||
|
||
getSupportedNetworkNames(state) { | ||
return Object.values(state.supportedNetworks); | ||
}, | ||
|
||
getTokens(state) { | ||
return tokens[String(chainId.value)] | ||
}, | ||
|
||
isNetworkSupported(state) { | ||
const supportedIds = Object.keys(state.supportedNetworks); | ||
|
||
if (supportedIds && supportedIds.includes(String(chainId.value))) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
}, | ||
|
||
mutations: { | ||
setNetworkData(state) { | ||
// TODO | ||
state.networkName = "Mode"; | ||
state.networkCurrency = "ETH"; | ||
} | ||
}, | ||
|
||
actions: { | ||
|
||
} | ||
|
||
}; | ||
namespaced: true, | ||
|
||
state: () => ({ | ||
networkCurrency: 'ETH', | ||
networkName: 'Unsupported Network', | ||
supportedNetworks: { | ||
34443: 'Mode', | ||
}, | ||
}), | ||
|
||
getters: { | ||
getBlockExplorerBaseUrl() { | ||
// TODO | ||
return 'https://explorer.mode.network/' | ||
}, | ||
|
||
getChainId() { | ||
return chainId.value | ||
}, | ||
|
||
getNetworkCurrency(state) { | ||
return state.networkCurrency | ||
}, | ||
|
||
getNetworkName(state) { | ||
const supportedIds = Object.keys(state.supportedNetworks) | ||
|
||
if (supportedIds && supportedIds.includes(String(chainId.value))) { | ||
return state.networkName | ||
} | ||
|
||
return 'Unsupported Network' | ||
}, | ||
|
||
getSupportedNetworks(state) { | ||
return state.supportedNetworks | ||
}, | ||
|
||
getSupportedNetworkIds(state) { | ||
return Object.keys(state.supportedNetworks) | ||
}, | ||
|
||
getSupportedNetworkNames(state) { | ||
return Object.values(state.supportedNetworks) | ||
}, | ||
|
||
getTokens(state) { | ||
return tokens[String(chainId.value)] | ||
}, | ||
|
||
isNetworkSupported(state) { | ||
const supportedIds = Object.keys(state.supportedNetworks) | ||
|
||
if (supportedIds && supportedIds.includes(String(chainId.value))) { | ||
return true | ||
} | ||
|
||
return false | ||
}, | ||
}, | ||
|
||
mutations: { | ||
setNetworkData(state) { | ||
// TODO | ||
state.networkName = 'Mode' | ||
state.networkCurrency = 'ETH' | ||
}, | ||
}, | ||
|
||
actions: {}, | ||
} |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import tldAbi from "../../abi/PunkTLD.json"; | ||
import tldAbi from '../../abi/PunkTLD.json' | ||
|
||
export default { | ||
namespaced: true, | ||
namespaced: true, | ||
|
||
getters: { | ||
getTldAbi() { | ||
return tldAbi; | ||
} | ||
} | ||
}; | ||
getters: { | ||
getTldAbi() { | ||
return tldAbi | ||
}, | ||
}, | ||
} |
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 |
---|---|---|
@@ -1,19 +1,11 @@ | ||
export default { | ||
namespaced: true, | ||
|
||
state: () => ({ | ||
|
||
}), | ||
namespaced: true, | ||
|
||
getters: { | ||
|
||
}, | ||
state: () => ({}), | ||
|
||
mutations: { | ||
|
||
}, | ||
getters: {}, | ||
|
||
actions: { | ||
} | ||
}; | ||
mutations: {}, | ||
|
||
actions: {}, | ||
} |
Oops, something went wrong.