From ac811cce0e4abc4d7a96d60bd527d3aa2d0e1883 Mon Sep 17 00:00:00 2001 From: Suraj Kohli Date: Wed, 26 Jun 2024 20:28:37 +0530 Subject: [PATCH] newer contracts deployed --- SolasPresentation.md | 6 + .../nextjs/contracts/deployedContracts.ts | 161 +++--------------- packages/snfoundry/scripts-ts/deploy.ts | 13 +- 3 files changed, 31 insertions(+), 149 deletions(-) diff --git a/SolasPresentation.md b/SolasPresentation.md index 1e83227..0f0b1dc 100644 --- a/SolasPresentation.md +++ b/SolasPresentation.md @@ -44,5 +44,11 @@ data: { ## Sepolia Deployment Addresses +25th June SchemaRegistry: 0x067bdf6bf6f1b72315c541abdc443cdd55992ea29546933ddfec19cb200fce87 AttestationRegistry: 0x034f38c70a7d4b1bab0b919c923545e74b188f95915b92b5febf12b0dafe6686 + +26th June - Finale +SchemaRegistry: 0x0011bc1356dda0d57fe748a2f30f53e65f8cc5a16c46be71b495d71004ac9b08 +AttestationRegistry: 0x0755a87fa1f416ad81a1ae94bc29e17bf4a2fa820c61a35ccdcdc08746cd319c + diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 577e39b..a2e38b1 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -5,15 +5,14 @@ const deployedContracts = { devnet: { - AttestationRegistry: { + SchemaRegistry: { address: - "0x043a0fcd4152f67425ca045f81babfdf9d8a0ed7a3e4dda1f1a5bfc094a8d5da", + "0x029ea3f8f406a659c903a3e02ed102f0a21048fd40639a96f57637aadc1d6999", abi: [ { type: "impl", - name: "AttestationRegistryImpl", - interface_name: - "contracts::AttestationRegistry::IAttestationRegistry", + name: "SchemaRegistryImpl", + interface_name: "contracts::SchemaRegistry::ISchemaRegistry", }, { type: "struct", @@ -47,78 +46,16 @@ const deployedContracts = { }, ], }, - { - type: "struct", - name: "contracts::AttestationRegistry::Attestation", - members: [ - { - name: "uid", - type: "core::integer::u128", - }, - { - name: "schema_uid", - type: "core::integer::u128", - }, - { - name: "time", - type: "core::integer::u64", - }, - { - name: "recipient", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "attester", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "data", - type: "core::byte_array::ByteArray", - }, - { - name: "revocable", - type: "core::bool", - }, - { - name: "revocation_time", - type: "core::integer::u64", - }, - ], - }, { type: "interface", - name: "contracts::AttestationRegistry::IAttestationRegistry", + name: "contracts::SchemaRegistry::ISchemaRegistry", items: [ { type: "function", - name: "get_attestation", - inputs: [ - { - name: "attestation_uid", - type: "core::integer::u128", - }, - ], - outputs: [ - { - type: "contracts::AttestationRegistry::Attestation", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "attest", + name: "register", inputs: [ { - name: "schema_uid", - type: "core::integer::u128", - }, - { - name: "recipient", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "data", + name: "schema", type: "core::byte_array::ByteArray", }, { @@ -135,104 +72,52 @@ const deployedContracts = { }, { type: "function", - name: "revoke", + name: "get_schema", inputs: [ { - name: "schema_uid", + name: "uid", type: "core::integer::u128", }, + ], + outputs: [ { - name: "attestation_uid", - type: "core::integer::u128", + type: "(core::integer::u128, core::bool, core::byte_array::ByteArray)", }, ], - outputs: [], - state_mutability: "external", - }, - ], - }, - { - type: "constructor", - name: "constructor", - inputs: [ - { - name: "schema_registry_address", - type: "core::starknet::contract_address::ContractAddress", + state_mutability: "view", }, ], }, { type: "event", - name: "contracts::AttestationRegistry::AttestationRegistry::Attested", + name: "contracts::SchemaRegistry::SchemaRegistry::Registered", kind: "struct", members: [ - { - name: "recipient", - type: "core::starknet::contract_address::ContractAddress", - kind: "key", - }, - { - name: "attester", - type: "core::starknet::contract_address::ContractAddress", - kind: "key", - }, { name: "uid", type: "core::integer::u128", - kind: "data", - }, - { - name: "schema_uid", - type: "core::integer::u128", kind: "key", }, { - name: "timestamp", - type: "core::integer::u64", - kind: "data", - }, - ], - }, - { - type: "event", - name: "contracts::AttestationRegistry::AttestationRegistry::Revoked", - kind: "struct", - members: [ - { - name: "recipient", - type: "core::starknet::contract_address::ContractAddress", - kind: "key", - }, - { - name: "attester", + name: "caller", type: "core::starknet::contract_address::ContractAddress", - kind: "key", - }, - { - name: "schema_uid", - type: "core::integer::u128", - kind: "key", + kind: "data", }, { - name: "attestation_uid", - type: "core::integer::u128", + name: "schema_record", + type: "core::byte_array::ByteArray", kind: "data", }, ], }, { type: "event", - name: "contracts::AttestationRegistry::AttestationRegistry::Event", + name: "contracts::SchemaRegistry::SchemaRegistry::Event", kind: "enum", variants: [ { - name: "Attested", - type: "contracts::AttestationRegistry::AttestationRegistry::Attested", - kind: "nested", - }, - { - name: "Revoked", - type: "contracts::AttestationRegistry::AttestationRegistry::Revoked", + name: "Registered", + type: "contracts::SchemaRegistry::SchemaRegistry::Registered", kind: "nested", }, ], @@ -243,7 +128,7 @@ const deployedContracts = { sepolia: { SchemaRegistry: { address: - "0x067bdf6bf6f1b72315c541abdc443cdd55992ea29546933ddfec19cb200fce87", + "0x0011bc1356dda0d57fe748a2f30f53e65f8cc5a16c46be71b495d71004ac9b08", abi: [ { type: "impl", @@ -362,7 +247,7 @@ const deployedContracts = { }, AttestationRegistry: { address: - "0x034f38c70a7d4b1bab0b919c923545e74b188f95915b92b5febf12b0dafe6686", + "0x0755a87fa1f416ad81a1ae94bc29e17bf4a2fa820c61a35ccdcdc08746cd319c", abi: [ { type: "impl", diff --git a/packages/snfoundry/scripts-ts/deploy.ts b/packages/snfoundry/scripts-ts/deploy.ts index 3c1b355..aa4dff9 100644 --- a/packages/snfoundry/scripts-ts/deploy.ts +++ b/packages/snfoundry/scripts-ts/deploy.ts @@ -7,25 +7,16 @@ const deployScript = async (): Promise => { // }, // "SchemaRegistry", // ); - // 0x077cf1b7bb4ce74559dbbab85714f1d69e520657670639ff77c9e99eedeb13f6 + // 0x0011bc1356dda0d57fe748a2f30f53e65f8cc5a16c46be71b495d71004ac9b08 await deployContract( { schema_registry_address: - "0x067bdf6bf6f1b72315c541abdc443cdd55992ea29546933ddfec19cb200fce87", // the deployer address is the owner of the contract, + "0x0011bc1356dda0d57fe748a2f30f53e65f8cc5a16c46be71b495d71004ac9b08", // the deployer address is the owner of the contract, }, "AttestationRegistry" ); }; -// 0x03cdf276779fe3c83772cadc086b676c98bd602bcb8078c3736df49bb4003d0f - -// await deployContract( -// { -// schema_registry_address: "0x075d3a77b16fdb4609b981f6f8ccb393470b67ee64a832139931483f099c36d8", // the deployer address is the owner of the contract, -// }, -// // "SchemaRegistry", -// "AttestationRegistry" -// ); deployScript() .then(() => {