# Smart Contract

## `constructor()`

```solidity
constructor(address _publicKey, uint256 _cluID) {
        publicKey = _publicKey;
        cluID = _cluID;
}
```

The `_publicKey` that you need to put if you are using our public backend service is **`0xd1309C93a4bF7C7a1eE81E5fC8291Adb583cc602`** and the **`cluID`** is **`0`**

## `useclu3()`

```solidity
function useclu3(uint256 _timestamp, bytes memory signature) public returns(bool) {
        bytes32 message = keccak256(abi.encodePacked(msg.sender, _timestamp, cluID));
        if(recoverSigner(message, signature) == publicKey) {
            if(checkStorage(Strings.toString(_timestamp))){
                return true;
            } else {
                revert("timestamp + cluID already used");
            }
        }
        revert("Invalid signature");
}
```

The arguments that needs to be passed are the **`_timestamp`** and the **`signature of the message`** returned by the backend service.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://clu3-1.gitbook.io/clu3/quick-setup-and-go/smart-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
