AsseteraAssetera Docs
Smart contracts

TypeScript SDK

Consume AsseteraECS with @asseteragmbh/evm-contracts: ABIs, per-chain addresses, a viem client, and wagmi hooks, all generated from the contract.

@asseteragmbh/evm-contracts is the one dependency you need to talk to AsseteraECS. It ships the ABIs, the deployed addresses per chain, a viem client, and wagmi hooks, all generated from the Solidity source in the public Assetera-AG/AsseteraEvmContracts repo (design: ADR-0026). Nothing is hand-copied, so it never drifts from what is on chain. The package source and its generator config live in packages/sdk.

npm i @asseteragmbh/evm-contracts viem
# for the React hooks also:
npm i wagmi @tanstack/react-query

Public package

The package is published public on npmjs: no auth token, no .npmrc entry, nothing to request. The source is public too, in the repo linked above.

Deployments

Every address here comes straight from the installed package, so it matches exactly what your app resolves. One tab per network the package carries; the SDK resolves all of them by chain id.

Addresses exactly as published in @asseteragmbh/evm-contracts, the version these docs are built against.

Chain ID 80002 · CAIP-2 eip155:80002 · deployed at block 42,134,204

ContractAddress (integrate against this)
AsseteraECS0x58c3Fb1B69ca985A5461CcEfFd0Fe590b653F213
Forwarder0x402D2d3e7CdD42cAb656475952961f150f3Cf07f
MockRWA0x7c8d03B4aA9b4A21BAA82266f10174f0961a7A0E
MockUSDC0xf4e1049Ec8b2C8CD2e5a6554acA3f5c267951043

Behind the proxy. The addresses above are the stable ones. The UUPS implementation below is what the proxy currently delegates to. It is useful for verifying the deployed bytecode, but it changes on every upgrade, so never hardcode it.

ContractImplementation (changes on every upgrade)
AsseteraECS0xe0A9AA1ec16c2d9402AfD5e276e4691B5b1c0bd5

Chain ID 11155111 · CAIP-2 eip155:11155111 · deployed at block 11,264,402

ContractAddress (integrate against this)
AsseteraECS0x58c3Fb1B69ca985A5461CcEfFd0Fe590b653F213
Forwarder0x402D2d3e7CdD42cAb656475952961f150f3Cf07f
MockRWA0x7c8d03B4aA9b4A21BAA82266f10174f0961a7A0E
MockUSDC0xf4e1049Ec8b2C8CD2e5a6554acA3f5c267951043

Behind the proxy. The addresses above are the stable ones. The UUPS implementation below is what the proxy currently delegates to. It is useful for verifying the deployed bytecode, but it changes on every upgrade, so never hardcode it.

ContractImplementation (changes on every upgrade)
AsseteraECS0xe0A9AA1ec16c2d9402AfD5e276e4691B5b1c0bd5

Quickstart

Pick the entry point for your app. The AsseteraECS address is resolved by chain id in every path, so you never hardcode it.

The generated hooks resolve the address from the connected chain, so you pass no address.

import { useReadAsseteraEcsTotalOrders } from '@asseteragmbh/evm-contracts/react';

function Orders() {
  const { data } = useReadAsseteraEcsTotalOrders(); // address auto-resolved per chain
  return <span>{data?.toString()}</span>;
}

Wrap the app in the usual wagmi WagmiProvider and QueryClientProvider, configured for the chain you deploy to.

createExchangeClient returns a viem contract bound to the right address for the chain.

import { createPublicClient, http } from 'viem';
import { polygonAmoy } from 'viem/chains';
import { createExchangeClient } from '@asseteragmbh/evm-contracts';

const publicClient = createPublicClient({ chain: polygonAmoy, transport: http() });
const exchange = createExchangeClient({ chainId: 80002, publicClient });

const version = await exchange.read.version();
const total = await exchange.read.totalOrders();

The /contracts entry is pure data (ABIs plus address helpers) with no viem or wagmi pulled in, so it is safe for a Subsquid processor.

import { asseteraEcsAbi, getContractAddress } from '@asseteragmbh/evm-contracts/contracts';

const address = getContractAddress(80002, 'AsseteraECS');
// feed asseteraEcsAbi to your log decoder / viem parseEventLogs

The raw deployment JSON ships inside the package, so a non-TypeScript service reads addresses without a code generator.

node_modules/@asseteragmbh/evm-contracts/dist/deployments/<chainId>.json

Each file carries chainId, caip2, namespace, the contracts addresses, and deploy metadata.

Live state

These docs read the Polygon Amoy deployment live, using the same ABI and address the SDK hands your app. Swap the chain id for any other deployed network above:

Reading AsseteraECS live…

Entry points

ImportForRuntime deps
@asseteragmbh/evm-contractsservices: ABIs, addresses, createExchangeClientviem
@asseteragmbh/evm-contracts/contractsindexer / non-viem: ABIs plus address helpersnone
@asseteragmbh/evm-contracts/reactfront ends: wagmi hooks, address auto-resolvedwagmi, react

Next

On this page