Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 1x 1x 1x 1x 2x 1x 1x 2x 1x 1x | import { GetterTree } from "vuex";
import { ContractGetterName } from "./names";
import { ContractState } from "./state";
const getters: GetterTree<ContractState, any> = {
// get loading status
[ContractGetterName.getLoading](state) {
return state.loading;
},
// get current eth address
[ContractGetterName.getCurrentAddress](state) {
return state.address;
},
// get all the contract addresses
[ContractGetterName.getContractAdresses](state) {
return (network: string) =>
state.contractsData[network].map(c => c.contract.contract_address);
},
// get contract ContractDetails
[ContractGetterName.getContractDetails](state) {
return (network: string) =>
Object.keys(state.contractDetails[network]).map(
key => state.contractDetails[network][key]
);
},
[ContractGetterName.getNFTImages](state) {
return (network: string) => state.contractDetails[network][state.name].ids;
},
[ContractGetterName.getCompKey](state) {
return state.compKey;
}
};
export default getters;
|