# Contract Method

In the following code snippet, methods and properties are grouped into three categories:

## **Public:** <a href="#public" id="public"></a>

These are the primary methods users interact with through transactions. They are named normally.

## **Private:** <a href="#private" id="private"></a>

Intended for internal use only and accessible for testing. They start with an underscore (”\_”).

## **Single Node Call (SNC):** <a href="#single-node-call-snc" id="single-node-call-snc"></a>

Executed only on a single node, without creating a blockchain transaction. They start with a double underscore (”\_\_”).

Similarly, properties follow the same naming conventions. However, most interactions happen through methods (endpoints) rather than properties.

```javascript
var CRC_Contract = {
  method1: function(param1, param2){ ... },   // Public method
  _method2: function(param1, param2){ ... },  // Private method
  __method3: function(param1, param2){ ... }  // SNC method
};
```

<mark style="color:blue;">**Single Node Call (SNC)**</mark> methods are key in retrieving data (e.g., wallet balance) without altering the blockchain state. SNCs should never modify contract state, ensuring consistency and reliability. While Hyper Code enforces this, adhering to best practices prevents potential inconsistencies.

## Examples <a href="#examples" id="examples"></a>

### Transaction (Modfiying State) <a href="#transaction-modfiying-state" id="transaction-modfiying-state"></a>

```javascript
CRC_Contract.TransferFunds("0x00023...40e20asd", 100);
```

### SNC (querying balance) <a href="#snc-querying-balance" id="snc-querying-balance"></a>

```javascript
CRC_Contract.__BalanceOf("0x00023...40e20asd");
```

SNCs incur gas fees but are cheaper than transactions. In the next tutorial, we’ll create and deploy your first smart contract, with debugging tips along the way.[<br>](https://circular-protocol.gitbook.io/circular-developer-docs/your-first-dapp-on-circular/smart-contracts)


---

# 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://circular-protocol.gitbook.io/hyper-code-ide-guide/lesson-1-get-started/editor.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.
