Skip to content

Commit

Permalink
Add setMaxOrdersPerPrice script
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSamWitch committed Feb 17, 2024
1 parent 6c96195 commit 586b258
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"deployTestData": "npx hardhat run scripts/deployTestData.ts",
"deployUpgrade": "npx hardhat run scripts/deployUpgrade.ts",
"setTokenIdInfos": "npx hardhat run scripts/setTokenIdInfos.ts",
"setMaxOrdersPerPrice": "npx hardhat run scripts/setMaxOrdersPerPrice.ts",
"impersonate": "npx hardhat run scripts/impersonate.ts",
"verify": "npx hardhat verify",
"fork": "npx hardhat node",
Expand Down
19 changes: 19 additions & 0 deletions scripts/setMaxOrdersPerPrice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {ethers} from "hardhat";
import {swobAddress} from "./helpers";

async function main() {
const [owner] = await ethers.getSigners();
console.log(
`Setting setMaxOrdersPerPrice with the account: ${owner.address} on chain id: ${(await ethers.provider.getNetwork()).chainId}`,
);

const samWitchOrderBook = await ethers.getContractAt("SamWitchOrderBook", swobAddress);
const tx = await samWitchOrderBook.setMaxOrdersPerPrice(12);
await tx.wait();
console.log("orderBook.setMaxOrdersPerPrice");
}

main().catch((error) => {
console.error(error);
process.exitCode = 1;
});

0 comments on commit 586b258

Please sign in to comment.