@primuslabs/zktls-contracts
v0.1.0
Published
Primus zkTLS contracts
Downloads
5
Readme
Primus zktls-contract
The Primus zkTLS protocol is compatible with multiple blockchains. We provide smart contracts that can be deployed on different blockchains to verify data proofs generated by users through the zkTLS SDK.
Documentation
You can find the documentation here: Primus-Doc
Supported Blockchains
You can check the contract address on the Contract Addresses List.
Supported Languages
- [x] Solidity
Usage Example
- using Primus ZKTLs contracts in Foundry
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { IPrimusZKTLS, Attestation } from "@primuslabs/zktls-contracts/src/IPrimusZKTLS.sol";
contract AttestorTest {
address public primusAddress;
constructor(address _primusAddress) {
// Replace with the network you are deploying on
primusAddress = _primusAddress;
}
function verifySignature(Attestation calldata attestation) public view returns(bool) {
IPrimusZKTLS(primusAddress).verifyAttestation(attestation);
// Your business logic upon successful verification
// Example: Verify that proof.context matches your expectations
return true;
}
}
Usage
Test
$ forge testDeploy
$ forge script script/PrimusZKTLS.s.sol --rpc-url <your_rpc_url> --private-key <your_private_key> --broadcastUpgrade
$ forge script script/UpgradeZKTLS.s.sol --rpc-url <your_rpc_url> --private-key <your_private_key> --broadcast
Help
$ forge --help
$ anvil --help
$ cast --help