Skip to content

Commit

Permalink
feat: add deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Th0rgal committed May 14, 2024
1 parent ea8a818 commit b0e8587
Show file tree
Hide file tree
Showing 7 changed files with 51,589 additions and 1 deletion.
21 changes: 20 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
import { HardhatUserConfig } from "hardhat/config";
import { vars, HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

const INFURA_API_KEY = vars.get("INFURA_API_KEY");
const PRIVATE_KEY = vars.get("PRIVATE_KEY");
const ETHERSCAN_API_KEY = vars.get("ETHERSCAN_API_KEY");

const config: HardhatUserConfig = {
solidity: "0.8.24",
networks: {
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`,
accounts: [PRIVATE_KEY],
},
sepolia: {
url: `https://sepolia.infura.io/v3/${INFURA_API_KEY}`,
accounts: [PRIVATE_KEY],
},
},
etherscan: {
apiKey: {
mainnet: ETHERSCAN_API_KEY,
},
},
};

export default config;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../build-info/eb7a073755a6bca5e391672b677e5a6b.json"
}

Large diffs are not rendered by default.

51,172 changes: 51,172 additions & 0 deletions ignition/deployments/chain-1/build-info/eb7a073755a6bca5e391672b677e5a6b.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions ignition/deployments/chain-1/deployed_addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"OffchainResolverModule#OffchainResolver": "0x9F823e71024A295c2ab83972761158103562cEB5"
}
10 changes: 10 additions & 0 deletions ignition/deployments/chain-1/journal.jsonl

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions ignition/modules/OffchainResolver.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";

const INITIAL_URL = "https://api.starknet.id/crosschain/ethereum/resolve";
const INITIAL_SIGNER = "0x47D4c3Be0d05D100E739Bda560Fe0243b2702FdE";

const OffchainResolverModule = buildModule("OffchainResolverModule", (m) => {
// Deploy the OffchainResolver contract
const offchainResolver = m.contract("OffchainResolver");

// Set the URL
m.call(offchainResolver, "setURL", [INITIAL_URL]);

// Set the signers
m.call(offchainResolver, "setSigners", [[INITIAL_SIGNER]]);

return { offchainResolver };
});

export default OffchainResolverModule;

0 comments on commit b0e8587

Please sign in to comment.