-
Notifications
You must be signed in to change notification settings - Fork 37
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
Adapt Account to OpenZeppelin 0.1.0 and Argent 0.2.1 #108
Conversation
src/account-utils.ts
Outdated
// Full path to where the artifacts will be saved | ||
const artifactsTargetPath = path.join( | ||
baseArtifactsPath, | ||
ACCOUNT_ARTIFACTS_VERSION, | ||
accountType, | ||
artifactsVersion, | ||
artifactsBase | ||
); | ||
|
||
const jsonArtifact = artifactsName + ".json"; | ||
const abiArtifact = artifactsName + ABI_SUFFIX; | ||
|
||
const artifactLocationUrl = GITHUB_ACCOUNT_ARTIFACTS_URL.concat( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we using Github repo for this? Why don't we just load the artifacts from the directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { nonce } = await this.starknetContract.call("get_nonce"); | ||
return nonce; | ||
} | ||
|
||
protected hasRawOutput(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're asking why it isn't a property, it doesn't have to be, it's just following the same paradigm as getExecutionFunctionName
, which could also be a property set through constructor.
}); | ||
}); | ||
} | ||
const baseArtifactsPath = path.join(hre.config.paths.starknetArtifacts, ACCOUNT_ARTIFACTS_DIR); | ||
|
||
// Full path to where the artifacts will be saved | ||
const artifactsTargetPath = path.join( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are artifacs being saved to a target directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accounts are also contracts. So for the plugin to be able to interact with them as contracts, their artifacts need to be in the artifacts directory. Internally, doing account.call(...)
does something like account.starknetContract.call(...)
Usage related changes
Development related changes
__execute__
Checklist:
plugin
branch ofstarknet-hardhat-example
.