-
Notifications
You must be signed in to change notification settings - Fork 124
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
chore: imporved deployement script #220
Conversation
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.
we cant commit this file. @ikemHood
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.
i should be able to call this
await deployContract(
"YourContract",
"YourContractExportName",
{
owner: deployer.address
},
{
maxFee: BigInt(1000000000000)
}
);
also this ( THIS IS NOT POSSIBLE YET , IT ENFORCES A EXPORT NAME )
await deployContract(
"YourContract",
{
owner: deployer.address,
}
and also this for a contract that doesnt receive a constructor
await deployContract(
"YourContract",
);
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.
This works?
await deployContract(
{
contractName: "YourContract",
exportContractName: "YourContractExportName",
constructorArgs: {
owner: deployer.address,
},
options:{
maxFee: BigInt(1000000000000)
}
}
);
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.
this also works, lets do contractName
-> contract
& exportContractName
-> contractName
. ensure correct typing. and should be able to just pass
await deployContract(
{
contract: "YourContract",
}
);
and should work @ikemHood
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.
lets add some instructions as comments on how to use this function with example within this deployScript()
function,
let deployCalls = []; | ||
|
||
const { provider, deployer }: Network = networks[networkName]; | ||
|
||
const declareIfNot_NotWait = async (payload: any) => { | ||
const declareIfNot_NotWait = async (payload: DeclareContractPayload, options?: { maxFee?: bigint}) => { |
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.
this is a maxDeclareFee
rather than a maxFee
at the moment.
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.
we can add another optional maxFee
here
const executeDeployCalls = async () => {
and this maxFee will be set up once inside deploy.ts
and passed to this function when its called, should be nullable item and add instructions on deploy.ts
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.
executeDeployCalls
usage doesn't make it straight forward to add this params, but i have added it regardless.
another option can be to set the options from deployContract to a variable just like the deployCalls and access it inside the function. Let me know if i should implement this
this PR shoudnt change anything on |
.gitignore
Outdated
|
||
# bun | ||
bun.lockb |
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 do we have this ? @ikemHood
this PR shoudnt change anything on packages/nextjs please check the changed files. |
also please check failing CI |
Hi @ikemHood , you must add the removed files, even if they are auto-generated, you cannot remove anything from packages/nextjs, keep it the same as the main, it has already been left in the comments. Please also review the rest of the comments, the tests continue to fail, once this is corrected, upload it with the correct CI |
This reverts commit 35a01be.
closing this as changes are still visible on |
Improve deploy function on deploy-contract.ts
Fixes #217
utilized maxFee
removed unused imports
imporved logging
tested on devnet and sepolia