Skip to content

Commit

Permalink
newer contracts deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
KohliSuraj committed Jun 26, 2024
1 parent dccce0c commit ac811cc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 149 deletions.
6 changes: 6 additions & 0 deletions SolasPresentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,11 @@ data: {

## Sepolia Deployment Addresses

25th June
SchemaRegistry: 0x067bdf6bf6f1b72315c541abdc443cdd55992ea29546933ddfec19cb200fce87
AttestationRegistry: 0x034f38c70a7d4b1bab0b919c923545e74b188f95915b92b5febf12b0dafe6686

26th June - Finale
SchemaRegistry: 0x0011bc1356dda0d57fe748a2f30f53e65f8cc5a16c46be71b495d71004ac9b08
AttestationRegistry: 0x0755a87fa1f416ad81a1ae94bc29e17bf4a2fa820c61a35ccdcdc08746cd319c

161 changes: 23 additions & 138 deletions packages/nextjs/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
},
{
Expand All @@ -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",
},
],
Expand All @@ -243,7 +128,7 @@ const deployedContracts = {
sepolia: {
SchemaRegistry: {
address:
"0x067bdf6bf6f1b72315c541abdc443cdd55992ea29546933ddfec19cb200fce87",
"0x0011bc1356dda0d57fe748a2f30f53e65f8cc5a16c46be71b495d71004ac9b08",
abi: [
{
type: "impl",
Expand Down Expand Up @@ -362,7 +247,7 @@ const deployedContracts = {
},
AttestationRegistry: {
address:
"0x034f38c70a7d4b1bab0b919c923545e74b188f95915b92b5febf12b0dafe6686",
"0x0755a87fa1f416ad81a1ae94bc29e17bf4a2fa820c61a35ccdcdc08746cd319c",
abi: [
{
type: "impl",
Expand Down
13 changes: 2 additions & 11 deletions packages/snfoundry/scripts-ts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,16 @@ const deployScript = async (): Promise<void> => {
// },
// "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(() => {
Expand Down

0 comments on commit ac811cc

Please sign in to comment.