Skip to content

Commit

Permalink
Zetachain Mainnet deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuanx committed Jan 27, 2024
1 parent 3aede9e commit f2b6887
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 6 deletions.
8 changes: 5 additions & 3 deletions contracts/hooks/KYCHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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_;
}

Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion deploy/13-deploy-native-token-ttudeployer-lite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down
2 changes: 1 addition & 1 deletion deploy/95-deploy-kychook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const deployClone: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
await deploy('KYCHook', {
from: deployer,
log: true,
args: ['0x29Dd65cb8654aE596d04bdf73Dd8995AAe4934b7'],
args: [],
waitConfirmations: 1
})
}
Expand Down
18 changes: 17 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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: [
{
Expand Down Expand Up @@ -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/'
}
}
]
},
Expand Down
5 changes: 5 additions & 0 deletions subgraph/config/zetachain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"network": "zetachain-mainnet",
"address": "0x2961121f816Ca5FC921Dd2Ff563345765845C3b8",
"startBlock": 1488393
}
1 change: 1 addition & 0 deletions subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit f2b6887

Please sign in to comment.