Skip to content

Commit

Permalink
add zero validation
Browse files Browse the repository at this point in the history
  • Loading branch information
andresaiello committed Aug 21, 2024
1 parent c82eed4 commit ad71195
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/zevm-app-contracts/contracts/xp-nft/xpNFT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ contract ZetaXP is ERC721Upgradeable, OwnableUpgradeable {
event NFTUpdated(address indexed sender, uint256 indexed tokenId, bytes32 tag);

error InvalidSigner();
error InvalidAddress();
error LengthMismatch();
error TransferNotAllowed();
error OutdatedSignature();
Expand All @@ -51,6 +52,7 @@ contract ZetaXP is ERC721Upgradeable, OwnableUpgradeable {
address signerAddress_,
address owner
) public initializer {
if (signerAddress_ == address(0)) revert InvalidAddress();
__ERC721_init(name, symbol);
__Ownable_init();
transferOwnership(owner);
Expand Down
2 changes: 1 addition & 1 deletion packages/zevm-app-contracts/scripts/xp-nft/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const deployZetaXP = async () => {

saveAddress("ZetaXP", zetaXP.address, networkName);

await verifyContract(zetaXP.address, [name, symbol, ZETA_BASE_URL, signer]);
await verifyContract(zetaXP.address, [name, symbol, ZETA_BASE_URL, signer, owner]);
await verifyContract(implementationAddress, []);
};

Expand Down

0 comments on commit ad71195

Please sign in to comment.