Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ module.exports = {
namedAccounts: {
deployer: { default: 0 },
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
networks: {
hardhat: {
tags: ["local"],
Expand Down Expand Up @@ -50,6 +53,13 @@ module.exports = {
// "<YOUR_SEPOLIA_TEST_WALLET_PRIVATE_KEY_HERE>"
],
},
sepolia: {
url: `https://ethereum-sepolia-rpc.publicnode.com`,
chainId: 11155111,
accounts: process.env.SEPOLIA_PRIVATE_KEY
? [process.env.SEPOLIA_PRIVATE_KEY]
: [],
},
linea_testnet: {
url: `https://public.sepolia.rpc.status.network`,
chainId: 1660990954,
Expand Down
10 changes: 10 additions & 0 deletions ignition/deployments/chain-11155111/deployed_addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"MarketplaceLogic#Marketplace": "0x61cb8E9b84B6Efd0e15ECeDb66fb5d337865C0AD",
"Token#TestToken": "0x201be5B4c6AE34D428A7c4405DAB0da0A348C1DB",
"Verifier#Groth16Verifier": "0x6435351Ba26d6Fe0B0b5E4E4a2943Fe14283F07A",
"Verifier#TestVerifier": "0x4e9371edcC916Fb54Cc638eBC7De3eD9f73a9023",
"Proxy#TransparentUpgradeableProxy": "0x904cd89A4783DcDaa4577e5812645aEDf3653cC8",
"Proxy#ProxyAdmin": "0x85e50D2dC1337F7f217C57929fcDD2D7B70a28C6",
"Marketplace#Marketplace": "0x904cd89A4783DcDaa4577e5812645aEDf3653cC8",
"UpgradeProxyImplementation#TestMarketplaceUpgraded": "0x1F40F019D4e82dd2C40CfCFc4eADA1d01ebc4288"
}
42 changes: 42 additions & 0 deletions ignition/deployments/chain-11155111/journal.jsonl

Large diffs are not rendered by default.

28 changes: 15 additions & 13 deletions ignition/modules/marketplace-test-upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,30 @@ const MarketplaceModule = require("./marketplace.js")
const upgradeModule = buildModule('UpgradeProxyImplementation', (m) => {
const config = hre.network.config

if (!(config && config.tags && config.tags.includes("local"))) {
throw new Error("Module is not meant for real deployments!")
}
// if (!(config && config.tags && config.tags.includes("local"))) {
// throw new Error("Module is not meant for real deployments!")
// }

const proxyAdminOwner = m.getAccount(9)
const marketplaceUpgraded = m.contract("TestMarketplaceUpgraded", [])
const {proxyAdmin, proxy, token} = m.useModule(MarketplaceModule);

m.call(proxyAdmin, "upgradeAndCall", [proxy, marketplaceUpgraded, "0x"], {
from: proxyAdminOwner,
});
// m.call(proxyAdmin, "upgradeAndCall", [proxy, marketplaceUpgraded, "0x"], {
// from: proxyAdminOwner,
// });

return { proxyAdmin, proxy, token };
})

/**
* The main module that represents the upgraded Marketplace contract.
*/
module.exports = buildModule('MarketplaceUpgraded', (m) => {
const { proxy, proxyAdmin, token } = m.useModule(upgradeModule)

const marketplace = m.contractAt('TestMarketplaceUpgraded', proxy)

return { marketplace, proxy, proxyAdmin, token }
})
// module.exports = buildModule('MarketplaceUpgraded', (m) => {
// const { proxy, proxyAdmin, token } = m.useModule(upgradeModule)
//
// const marketplace = m.contractAt('TestMarketplaceUpgraded', proxy)
//
// return { marketplace, proxy, proxyAdmin, token }
// })

module.exports = upgradeModule
4 changes: 4 additions & 0 deletions verifier/networks/sepolia/proof_main.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pragma circom 2.0.0;
include "sample_cells.circom";
// SampleAndProven( maxDepth, maxLog2NSlots, blockTreeDepth, nFieldElemsPerCell, nSamples )
component main {public [entropy,dataSetRoot,slotIndex]} = SampleAndProve(32, 8, 5, 67, 5);
104 changes: 104 additions & 0 deletions verifier/networks/sepolia/proof_main_verification_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"protocol": "groth16",
"curve": "bn128",
"nPublic": 3,
"vk_alpha_1": [
"20491192805390485299153009773594534940189261866228447918068658471970481763042",
"9383485363053290200918347156157836566562967994039712273449902621266178545958",
"1"
],
"vk_beta_2": [
[
"6375614351688725206403948262868962793625744043794305715222011528459656738731",
"4252822878758300859123897981450591353533073413197771768651442665752259397132"
],
[
"10505242626370262277552901082094356697409835680220590971873171140371331206856",
"21847035105528745403288232691147584728191162732299865338377159692350059136679"
],
[
"1",
"0"
]
],
"vk_gamma_2": [
[
"10857046999023057135944570762232829481370756359578518086990519993285655852781",
"11559732032986387107991004021392285783925812861821192530917403151452391805634"
],
[
"8495653923123431417604973247489272438418190587263600148770280649306958101930",
"4082367875863433681332203403145435568316851327593401208105741076214120093531"
],
[
"1",
"0"
]
],
"vk_delta_2": [
[
"7791164563743079419589440373723531715660863237515256801832496378744062705692",
"18140015760956658993401314410013399172580752447722106245827704769275144944365"
],
[
"17812654733893615050952431189498139904025668992277104449740946322604310593259",
"17369491537387214087127689025270527340613832203196753088110263926977142197544"
],
[
"1",
"0"
]
],
"vk_alphabeta_12": [
[
[
"2029413683389138792403550203267699914886160938906632433982220835551125967885",
"21072700047562757817161031222997517981543347628379360635925549008442030252106"
],
[
"5940354580057074848093997050200682056184807770593307860589430076672439820312",
"12156638873931618554171829126792193045421052652279363021382169897324752428276"
],
[
"7898200236362823042373859371574133993780991612861777490112507062703164551277",
"7074218545237549455313236346927434013100842096812539264420499035217050630853"
]
],
[
[
"7077479683546002997211712695946002074877511277312570035766170199895071832130",
"10093483419865920389913245021038182291233451549023025229112148274109565435465"
],
[
"4595479056700221319381530156280926371456704509942304414423590385166031118820",
"19831328484489333784475432780421641293929726139240675179672856274388269393268"
],
[
"11934129596455521040620786944827826205713621633706285934057045369193958244500",
"8037395052364110730298837004334506829870972346962140206007064471173334027475"
]
]
],
"IC": [
[
"11919420103024546168896650006162652130022732573970705849225139177428442519914",
"17747753383929265689844293401689552935018333420134132157824903795680624926572",
"1"
],
[
"13158415194355348546090070151711085027834066488127676886518524272551654481129",
"18831701962118195025265682681702066674741422770850028135520336928884612556978",
"1"
],
[
"20882269691461568155321689204947751047717828445545223718893788782534717197527",
"11996193054822748526485644723594571195813487505803351159052936325857690315211",
"1"
],
[
"18155166643053044822201627105588517913195535693446564472247126736722594445000",
"13816319482622393060406816684195314200198627617641073470088058848129378231754",
"1"
]
]
}
1 change: 1 addition & 0 deletions verifier/networks/sepolia/zkey_hash.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"754e3339afbb9260109b6dd3ab33a8136046cc45f525c790fbd385dcd8ad35de"
Loading