Skip to content

Commit

Permalink
update using latest hardhat and ether utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Yao authored and Bo Yao committed Nov 6, 2024
1 parent 8da137c commit 9da15a2
Show file tree
Hide file tree
Showing 7 changed files with 7,266 additions and 50 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-1337
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: "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
y: "0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8"
};

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 9da15a2

Please sign in to comment.