Skip to content

Commit

Permalink
reconfigure and upgrade to use new hardhat; full sign process on eth …
Browse files Browse the repository at this point in the history
…localnet
  • Loading branch information
Bo Yao authored and Bo Yao committed Nov 6, 2024
1 parent 8da137c commit d5ca01a
Show file tree
Hide file tree
Showing 10 changed files with 7,431 additions and 51 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ tmp
integration-tests/chain-signatures/.project

node_modules/
chain-signatures/contract-eth/artifacts
chain-signatures/contract-eth/cache
chain-signatures/contract-eth/ignition/deployments/chain-31337
10 changes: 3 additions & 7 deletions chain-signatures/contract-eth/hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
require("@nomiclabs/hardhat-waffle");
require("@nomicfoundation/hardhat-toolbox");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.17",
networks: {
hardhat: {
chainId: 1337
}
}
solidity: "0.8.27",
};
15 changes: 15 additions & 0 deletions chain-signatures/contract-eth/ignition/modules/chainSignatures.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const { buildModule } = require("@nomicfoundation/hardhat-ignition/modules");

const DEFAULT_PUBLIC_KEY = {
x: "0xfc115813e59a914d7566a4b1d4263048faf6b6dab6893c4d65d39fb123da5651",
y: "0x223a08726b9adf0032a1347611e35e9f14b7a8e7ee31a5d904190a4ef6fa47e1"
};

module.exports = buildModule("ChainSignaturesModule", (m, args = {}) => {
const deployPublicKey = args.publicKey || DEFAULT_PUBLIC_KEY;
const chainSignatures = m.contract("ChainSignatures", [deployPublicKey]);

return { chainSignatures };
});

// npx hardhat ignition deploy ignition/modules/chainSignatures.js --parameters '{"publicKey": {"x": "0xYOUR_X_VALUE", "y": "0xYOUR_Y_VALUE"}}'
Loading

0 comments on commit d5ca01a

Please sign in to comment.