diff --git a/contracts/hooks/KYCHook.sol b/contracts/hooks/KYCHook.sol index 11bc79c..02776e0 100644 --- a/contracts/hooks/KYCHook.sol +++ b/contracts/hooks/KYCHook.sol @@ -47,7 +47,7 @@ interface ISP { * @dev On-chain KYC verifier for ZetaChain native airdrop. */ contract KYCHook is ITTHook, Ownable, IVersionable { - ISP public immutable isp; + ISP public isp; mapping(uint256 => mapping(address => bool)) public acceptedSchemasAndAttesters; @@ -58,7 +58,9 @@ contract KYCHook is ITTHook, Ownable, IVersionable { */ error KYCFailed(); - constructor(ISP isp_) Ownable(_msgSender()) { + constructor() Ownable(_msgSender()) {} + + function setSignProtocol(ISP isp_) external onlyOwner { isp = isp_; } @@ -97,7 +99,7 @@ contract KYCHook is ITTHook, Ownable, IVersionable { } function version() external pure override returns (string memory) { - return "1.0.0-zetachain-airdrop"; + return "1.0.1-zetachain-airdrop"; } function _checkKYC(KYCData memory kycData, address applicant) internal { diff --git a/deploy/13-deploy-native-token-ttudeployer-lite.ts b/deploy/13-deploy-native-token-ttudeployer-lite.ts index d81120b..84ed098 100644 --- a/deploy/13-deploy-native-token-ttudeployer-lite.ts +++ b/deploy/13-deploy-native-token-ttudeployer-lite.ts @@ -20,7 +20,7 @@ const deployLite: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { args: [], waitConfirmations: 1 }) - const ftDeploymentResult = await deploy('TTFTV2Gasless', { + const ftDeploymentResult = await deploy('TTFutureTokenV2', { from: deployer, log: true, args: [], diff --git a/deploy/95-deploy-kychook.ts b/deploy/95-deploy-kychook.ts index 82e3b09..93d038e 100644 --- a/deploy/95-deploy-kychook.ts +++ b/deploy/95-deploy-kychook.ts @@ -11,7 +11,7 @@ const deployClone: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { await deploy('KYCHook', { from: deployer, log: true, - args: ['0x29Dd65cb8654aE596d04bdf73Dd8995AAe4934b7'], + args: [], waitConfirmations: 1 }) } diff --git a/hardhat.config.ts b/hardhat.config.ts index e95178c..baeabc8 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -133,6 +133,13 @@ export default { saveDeployments: true, zksync: false }, + zetachain: { + chainId: 7000, + url: 'https://zetachain-evm.blockpi.network/v1/rpc/public', + accounts: [process.env.PRIVATE_KEY], + saveDeployments: true, + zksync: false + }, scroll: { chainId: 534352, url: 'https://rpc.ankr.com/scroll', @@ -192,7 +199,8 @@ export default { avaxC: process.env.SNOWTRACE_KEY, sepolia: process.env.ETHERSCAN_KEY, mainnet: process.env.ETHERSCAN_KEY, - zetachainTestnet: process.env.ETHERSCAN_KEY + zetachainTestnet: process.env.ZETA_KEY, + zetachain: process.env.ZETA_KEY }, customChains: [ { @@ -227,6 +235,14 @@ export default { apiURL: 'https://zetachain-athens-3.blockscout.com/api', browserURL: 'https://zetachain-athens-3.blockscout.com/' } + }, + { + network: 'zetachain', + chainId: 7000, + urls: { + apiURL: 'https://zetachain.blockscout.com/api', + browserURL: 'https://zetachain.blockscout.com/' + } } ] }, diff --git a/subgraph/config/zetachain.json b/subgraph/config/zetachain.json new file mode 100644 index 0000000..312a3d3 --- /dev/null +++ b/subgraph/config/zetachain.json @@ -0,0 +1,5 @@ +{ + "network": "zetachain-mainnet", + "address": "0x2961121f816Ca5FC921Dd2Ff563345765845C3b8", + "startBlock": 1488393 +} diff --git a/subgraph/package.json b/subgraph/package.json index 68d8f2f..4618e47 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -15,6 +15,7 @@ "prep:mantaPacific": "mustache config/mantaPacific.json subgraph.template.yaml > subgraph.yaml", "prep:avaxC": "mustache config/avaxC.json subgraph.template.yaml > subgraph.yaml", "prep:zetachainTestnet": "mustache config/zetachainTestnet.json subgraph.template.yaml > subgraph.yaml", + "prep:zetachain": "mustache config/zetachain.json subgraph.template.yaml > subgraph.yaml", "prep:scroll": "mustache config/scroll.json subgraph.template.yaml > subgraph.yaml", "test": "graph test" },