Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #118

Merged
merged 6 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
}
],
"template-curly-spacing": ["error", "never"],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"]
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ __pycache__

#Starknet plugin
starknet-artifacts

#build
dist
notV4l marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
4 changes: 2 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const config: HardhatUserConfig = {
// Read about Devnet options here: https://0xSpaceShard.github.io/starknet-devnet/docs/guide/run
//
// *Account predeployment*
// "--seed",
// "42",
FabijanC marked this conversation as resolved.
Show resolved Hide resolved
"--seed",
"42"
// "--accounts",
// "1",
// "--initial-balance", <VALUE>
Expand Down
151 changes: 78 additions & 73 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"@types/chai": "^4.2.22",
"@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"chai": "^4.3.4",
"dotenv": "^16.0.1",
"eslint": "^8.5.0",
"eslint": "^8.43.0",
"ethers": "^5.4.6",
"prettier-eslint-cli": "^7.0.0",
"ts-node": "^10.4.0",
Expand Down
12 changes: 8 additions & 4 deletions test/argent-account-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import hardhat, { starknet } from "hardhat";
import { StarknetContract, StarknetContractFactory } from "hardhat/types/runtime";
import { TIMEOUT } from "./constants";
import { expectFeeEstimationStructure, getOZAccount, mint } from "./util";
import { HardhatPluginError } from "hardhat/plugins";

describe("Argent account", function () {
this.timeout(TIMEOUT);
Expand Down Expand Up @@ -95,7 +96,8 @@ describe("Argent account", function () {
const wrongKey = "0x0123";
await starknet.ArgentAccount.getAccountFromAddress(argentAccountAddress, wrongKey);
expect.fail("Should have failed on passing an incorrect private key.");
} catch (err: any) {
} catch (err) {
expect(err).to.be.instanceOf(HardhatPluginError);
FabijanC marked this conversation as resolved.
Show resolved Hide resolved
FabijanC marked this conversation as resolved.
Show resolved Hide resolved
expect(err.message).to.equal(
"The provided private key is not compatible with the public key stored in the contract."
);
Expand Down Expand Up @@ -143,7 +145,8 @@ describe("Argent account", function () {
{ maxFee: estimatedFee.amount / 2n }
);
expect.fail("Should have failed earlier");
} catch (err: any) {
} catch (err) {
expect(err).to.be.instanceOf(HardhatPluginError);
expect(err.message).to.contain("Actual fee exceeded max fee");
}

Expand Down Expand Up @@ -190,8 +193,9 @@ describe("Argent account", function () {
const account = await getArgentAccount();
try {
await account.declare(mainContractFactory, { maxFee: 1 });
} catch (error: any) {
expect(error.message).to.contain("Actual fee exceeded max fee");
} catch (err) {
expect(err).to.be.instanceOf(HardhatPluginError);
expect(err.message).to.contain("Actual fee exceeded max fee");
}
});

Expand Down
Loading