@settlemint/solidity-attestation-service
Version:
Smart contract set to use the Ethereum Attestation Service in SettleMint
24 lines (17 loc) • 838 B
text/typescript
import { buildModule } from '@nomicfoundation/hardhat-ignition/modules';
const CustomEASModule = buildModule('EASDeployment', (m) => {
const schemaRegistry = m.contract("SchemaRegistry", [], {});
const EAS = m.contract("EAS", [schemaRegistry], {});
return { schemaRegistry, EAS };
});
const SchemaRegistrationModule = buildModule('SchemaRegistrationModule', (m) => {
const schemaAddress = m.getParameter('address');
const schemaContract = m.contractAt('SchemaRegistry', schemaAddress);
const schema = m.getParameter('schema');
const resolverAddress = m.getParameter('resolverAddress')
const revocable = m.getParameter('revocable');
m.call(schemaContract, 'register', [schema, resolverAddress, revocable]);
return { schemaContract };
});
export default CustomEASModule;
export { SchemaRegistrationModule };