# Tracking the Protocol

### Tracking Staked Balance

The total tokens staked by a wallet can be called from a single read function of the protocol EVM contract on Ethereum Mainnet. It's contract address is as below and the source code can be found [here](https://github.com/anyone-protocol/hodler/blob/main/contracts/HodlerV5.sol).&#x20;

{% code title="Ethereum Mainnet Hodler Contract Address" %}

```
0x0d9a1ca7bc756ae009672db626cde3c9bef583ef
```

{% endcode %}

Note that the staked tokens do not include tokens that have been unstaked and are under the cooldown period before they can be withdrawn.&#x20;

The value can be fetched by calling the `getStake` function which returns a uint256 value. Note that $ANYONE has 18 decimals.&#x20;

{% code title="Function to Query Total Staked" %}

```
getStake(address _address); 
```

{% endcode %}

{% code title="ABI Reference for Total Staked function in Hodler" %}

```json
[
	{
			"inputs": [
				{
					"internalType": "address",
					"name": "_address",
					"type": "address"
				}
			],
			"name": "getStake",
			"outputs": [
				{
					"internalType": "uint256",
					"name": "",
					"type": "uint256"
				}
			],
			"stateMutability": "view",
			"type": "function"
		}
]
```

{% endcode %}

See an example code snippet for fetching this values with ethers.js:

```javascript
const provider;
const abi;
// Set provider URL and an abi JSON 

let address = 0xabc123; // Set target address 
const protocolAddress = '0x0d9a1ca7bc756ae009672db626cde3c9bef583ef';
const protocolContract = new ethers.Contract(protocolAddress, abi, provider);

let totalStaked = await protocolContract.getStake(<address>); 
```

*Last Updated: 29-Dec-2025*
