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

Detect build mode from metadata on deploy #193

Merged
merged 5 commits into from
Feb 26, 2024

Conversation

prxgr4mm3r
Copy link
Collaborator

No description provided.

@prxgr4mm3r prxgr4mm3r self-assigned this Nov 17, 2023
@prxgr4mm3r prxgr4mm3r linked an issue Nov 17, 2023 that may be closed by this pull request
src/lib/contract.ts Outdated Show resolved Hide resolved
src/commands/contract/deploy.ts Outdated Show resolved Hide resolved
Comment on lines 55 to 61
if (!check.result && check.missingTypes.includes(".contract")) {
throw new FileError(
`Cannot read .contract bundle, path not found: ${check.missingPaths.join(', ')}`
);
}

const contractFilePath = path.resolve(this.artifactsPath, `${this.moduleName}.json`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I'm not mistaken, in case when only .json file is missing, we will fail at the 61st line; maybe let's just check only check.result (?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it should be enough @prxgr4mm3r

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I optimized the Contract class by initializing the build mode directly within the constructor since contract's build lifecycle remains consistent across various commands such as contract deploy, contract call, and contract test.

@pmikolajczyk41
Copy link
Member

just to ensure - on this branch there is no way to have a verifiable build using swanky-cli, right?

@ipapandinas ipapandinas changed the base branch from master to ink-devhub-1 February 22, 2024 12:35
@ipapandinas
Copy link
Contributor

I just synced this branch with the Swanky verifiable build command and added a buildMode field to a contract build data @pmikolajczyk41

@ipapandinas ipapandinas merged commit e28c7c6 into ink-devhub-1 Feb 26, 2024
3 checks passed
@ipapandinas ipapandinas deleted the feature/build-mode branch February 26, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect build mode from metadata on deploy
3 participants