Get Sore
Primitives
Every score has it’s own model and id, so you need to provide them to get the score.
Model represents the calculating model of the score, and id is the unique identifier of the score.
Score | Chain | Model | Id |
---|---|---|---|
Astar zkEVM | Astar zkEVM | 11 (Common V3) | 3776 |
Berachain Artio Testnet | Berachain Artio | 11 (Common V3) | 80085 |
Blast | Blast | 11 (Common V3) | 81457 |
Blast Sepolia Testnet | Blast Sepolia | 11 (Common V3) | 81457 |
Core | Core Dao | 11 (Common V3) | 1116 |
Cronos | Cronos Mainnet | 11 (Common V3) | 25 |
Cross-Chain DeFi | OP Mainnet | 5 (Rubic) | 22202022 |
Energi | Energi | 11 (Common V3) | 39797 |
Enuls | Enuls | 11 (Common V3) | 119 |
EYWA | Polygon | 21 (Eywa) | 137 |
Gnosis | Gnosis | 11 (Common V3) | 100 |
Kroma | Kroma | 11 (Common V3) | 255 |
LayerZero | Arbitrum One | 12 (LayerZero) | 11101011 |
LightLink | LightLink Phoenix Mainnet | 11 (Common V3) | 1890 |
Linea | Linea Mainnet | 14 (Linea) | 59144 |
Manta | Manta Pacific Mainnet | 19 (Manta) | 169 |
Metis | Metis | 11 (Common V3) | 1088 |
Mint | Mint Mainnet | 11 (Common V3) | 888080688 |
Mode | Mode Mainnet | 11 (Common V3) | 34443 |
Moonbeam | Moonbeam | 11 (Common V3) | 1284 |
Multichain | Polygon | 11 (Common V3) | 9999999999999 |
Neon EVM | Neon EVM MainNet | 11 (Common V3) | 245022934 |
opBNB | opBNB | 11 (Common V3) | 59144 |
Plume Testnet | Plume Testnet | 11 (Common V3) | 161221135 |
Polygon zkEVM | Polygon zkEVM | 11 (Common V3) | 1101 |
Scroll | Scroll | 16 (Scroll) | 534352 |
Sei | Sei Network | 11 (Common V3) | 888080688 |
Taiko Katla Testnet | Taiko Katla Testnet | 11 (Common V3) | 167008 |
Web3 Social | Cyber | 22 (Web3 Social) | 888080688 |
ZetaChain Testnet | ZetaChain Athens Testnet | 11 (Common V3) | 7001 |
ZKFair | ZKFair Mainnet | 11 (Common V3) | 42766 |
zkLink Nova | zkLink Nova | 11 (Common V3) | 810180 |
zkSync | ZKsync Era | 11 (Common V3) | 324 |
Example
Here is an example for the Multichain Score on the Polygon chain:
import { type Address, createPublicClient, getContract, http } from "viem";
import { polygon } from "viem/chains";
import { abi } from "./abi";
const model = 11;
const id = 9999999999999n;
const publicClient = createPublicClient({
chain: polygon,
transport: http(),
});
const contract = getContract({
abi,
address: "0x4724F4B3936B4c2d52f8F452719870c5d4c86b4D",
client: publicClient,
});
const getScore = async (address: Address) => {
try {
const [score, timestamp, tokenId] = await contract.read.getScore([
address,
id,
model,
]);
return score / 100;
} catch (error) {
console.error(error);
}
};
console.log(await getScore("0x..."));