feat: 修改hcc合约
This commit is contained in:
parent
ce83984982
commit
a0d8070adc
|
|
@ -3,6 +3,7 @@ import useActiveWeb3React from 'hooks/useActiveWeb3React'
|
||||||
import {
|
import {
|
||||||
getBep20Contract,
|
getBep20Contract,
|
||||||
getCakeContract,
|
getCakeContract,
|
||||||
|
getHccContract,
|
||||||
getBunnyFactoryContract,
|
getBunnyFactoryContract,
|
||||||
getBunnySpecialContract,
|
getBunnySpecialContract,
|
||||||
getPancakeRabbitContract,
|
getPancakeRabbitContract,
|
||||||
|
|
@ -68,6 +69,10 @@ export const useCake = () => {
|
||||||
const { library } = useActiveWeb3React()
|
const { library } = useActiveWeb3React()
|
||||||
return useMemo(() => getCakeContract(library.getSigner()), [library])
|
return useMemo(() => getCakeContract(library.getSigner()), [library])
|
||||||
}
|
}
|
||||||
|
export const useHcc = () => {
|
||||||
|
const { library } = useActiveWeb3React()
|
||||||
|
return useMemo(() => getHccContract(library.getSigner()), [library])
|
||||||
|
}
|
||||||
|
|
||||||
export const useBunnyFactory = () => {
|
export const useBunnyFactory = () => {
|
||||||
const { library } = useActiveWeb3React()
|
const { library } = useActiveWeb3React()
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ export const getAddress = (address: Address): string => {
|
||||||
export const getCakeAddress = () => {
|
export const getCakeAddress = () => {
|
||||||
return getAddress(tokens.cake.address)
|
return getAddress(tokens.cake.address)
|
||||||
}
|
}
|
||||||
|
export const getHccAddress = () => {
|
||||||
|
return getAddress(tokens.hcc.address)
|
||||||
|
}
|
||||||
export const getMasterChefAddress = () => {
|
export const getMasterChefAddress = () => {
|
||||||
return getAddress(addresses.masterChef)
|
return getAddress(addresses.masterChef)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import {
|
||||||
getBunnyFactoryAddress,
|
getBunnyFactoryAddress,
|
||||||
getBunnySpecialAddress,
|
getBunnySpecialAddress,
|
||||||
getCakeAddress,
|
getCakeAddress,
|
||||||
|
getHccAddress,
|
||||||
getLotteryV2Address,
|
getLotteryV2Address,
|
||||||
getMasterChefAddress,
|
getMasterChefAddress,
|
||||||
getPointCenterIfoAddress,
|
getPointCenterIfoAddress,
|
||||||
|
|
@ -34,6 +35,7 @@ import bep20Abi from 'config/abi/erc20.json'
|
||||||
import erc721Abi from 'config/abi/erc721.json'
|
import erc721Abi from 'config/abi/erc721.json'
|
||||||
import lpTokenAbi from 'config/abi/lpToken.json'
|
import lpTokenAbi from 'config/abi/lpToken.json'
|
||||||
import cakeAbi from 'config/abi/cake.json'
|
import cakeAbi from 'config/abi/cake.json'
|
||||||
|
import hccAbi from 'config/abi/hcc.json'
|
||||||
import ifoV1Abi from 'config/abi/ifoV1.json'
|
import ifoV1Abi from 'config/abi/ifoV1.json'
|
||||||
import ifoV2Abi from 'config/abi/ifoV2.json'
|
import ifoV2Abi from 'config/abi/ifoV2.json'
|
||||||
import pointCenterIfo from 'config/abi/pointCenterIfo.json'
|
import pointCenterIfo from 'config/abi/pointCenterIfo.json'
|
||||||
|
|
@ -88,6 +90,9 @@ export const getPointCenterIfoContract = (signer?: ethers.Signer | ethers.provid
|
||||||
export const getCakeContract = (signer?: ethers.Signer | ethers.providers.Provider) => {
|
export const getCakeContract = (signer?: ethers.Signer | ethers.providers.Provider) => {
|
||||||
return getContract(cakeAbi, getCakeAddress(), signer)
|
return getContract(cakeAbi, getCakeAddress(), signer)
|
||||||
}
|
}
|
||||||
|
export const getHccContract = (signer?: ethers.Signer | ethers.providers.Provider) => {
|
||||||
|
return getContract(hccAbi, getHccAddress(), signer)
|
||||||
|
}
|
||||||
export const getProfileContract = (signer?: ethers.Signer | ethers.providers.Provider) => {
|
export const getProfileContract = (signer?: ethers.Signer | ethers.providers.Provider) => {
|
||||||
return getContract(profileABI, getPancakeProfileAddress(), signer)
|
return getContract(profileABI, getPancakeProfileAddress(), signer)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue