Attribution.getSchemaId
Determines the schema ID for an Attribution.Attribution
.
Imports
Named
import { Attribution } from 'ox/erc8021'
Examples
import { Attribution } from 'ox/erc8021'
const schemaId = Attribution.getSchemaId({
codes: ['baseapp']
})
0 const schemaId2 = Attribution.getSchemaId({
codes: ['baseapp'],
codeRegistryAddress: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
})
1
Definition
function getSchemaId(
attribution: Attribution.Attribution,
): SchemaId
Source: src/erc8021/Attribution.ts
Parameters
attribution
- Type:
Attribution.Attribution
The attribution object.
attribution.codeRegistryAddress
- Type:
abitype_Address
Address of the custom code registry contract.
attribution.codes
- Type:
readonly string[]
Attribution codes identifying entities involved in the transaction.
attribution.id
- Type:
1
- Optional
Schema identifier (1 for custom registry).
Return Type
The schema ID (0 for canonical registry, 1 for custom registry).