IAgent.getParams

getParams() external view returns (Params memory)

이 마루 네트워크의 ERC-8004 IdentityRegistry와 ReputationRegistry preinstall 주소를 반환합니다. Discovery 헬퍼 메서드입니다. 앱 시작 시 한 번 호출하면, testnet과 mainnet에서 올바른 레지스트리 주소를 하드코딩 없이 확인할 수 있습니다.

파라미터

이 메서드는 파라미터가 없습니다.

반환값

타입: Params

구조체 필드입니다. identityRegistry(address)는 ERC-8004 IdentityRegistry preinstall입니다(V1에서 활성화된 surface). reputationRegistry(address)는 ERC-8004 ReputationRegistry preinstall입니다(V2+를 위해 예약 — 활성화 여부와 무관하게 주소가 반환됩니다).

예제

IdentityRegistry 주소 해결

// Agent precompile address (constant across all Maroo networks)
const AGENT = "0x100000000000000000000000000000000000000A";

const { identityRegistry, reputationRegistry } = await publicClient.readContract({
  address: AGENT,
  abi: iAgentAbi,
  functionName: "getParams",
});
// identityRegistry === '0x8004000000000000000000000000000000000001' on the public testnet
ESC
검색어를 입력하세요