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

chore: publish contracts to soldeer #820

Merged
merged 13 commits into from
Aug 28, 2024
Merged

chore: publish contracts to soldeer #820

merged 13 commits into from
Aug 28, 2024

Conversation

sripwoud
Copy link
Contributor

@sripwoud sripwoud commented Jul 8, 2024

Closes #800

Publish semaphore contracts to https://soldeer.xyz as semaphore-protocol-contracts in addition to publishing to npm as @semaphore-protocol/contracts.

Copy link

openzeppelin-code bot commented Jul 8, 2024

chore: publish contracts to soldeer

Generated at commit: 92d620861c3d140b61700fabbdab1db5bdbc6cd9

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
0
0
0
4
15
19
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

package.json Outdated
@@ -21,8 +21,8 @@
"format": "prettier -c . && yarn workspace semaphore-docs format",
"format:write": "prettier -w . && yarn workspace semaphore-docs format:write",
"docs": "typedoc",
"version:bump": "yarn workspaces foreach -A --no-private version -d ${0} && yarn version apply --all && yarn remove:stable-version-field && NO_HOOK=1 git commit -am \"chore: v${0}\" && git tag v${0}",
"version:publish": "yarn build:libraries && yarn clean:cli-templates && yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public",
"version:bump": "ts-node scripts/version.ts ${0}",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

no directly related to this PR, but given the length of this command, I suggest extracting it in its own script definition file to improve readability

package.json Outdated
"version:bump": "yarn workspaces foreach -A --no-private version -d ${0} && yarn version apply --all && yarn remove:stable-version-field && NO_HOOK=1 git commit -am \"chore: v${0}\" && git tag v${0}",
"version:publish": "yarn build:libraries && yarn clean:cli-templates && yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public",
"version:bump": "ts-node scripts/version.ts ${0}",
"version:publish": "ts-node scripts/publish.ts",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this one we need to change to add the soldeer stuff.
As it gets more complicated, better to make a dedicated script file here too

async function maybePushToSoldeer() {
// api not documented, may change, found by inspecting the network tab
const response = await fetch(
"https://api.soldeer.xyz/api/v1/revision?project_name=semaphore-protocol-contracts&limit=1"
Copy link
Contributor Author

@sripwoud sripwoud Jul 8, 2024

Choose a reason for hiding this comment

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

I suggest semaphore-protocol-contracts as pkg name on soldeer. soldeer does not support orgs.

Copy link
Member

@cedoor cedoor Jul 9, 2024

Choose a reason for hiding this comment

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

What about semaphore-contracts? Sounds easier to remember

const { data, status } = await response.json()

// fail status is no version published at all yet
if (status === "fail" || compare(contractsLocalVersion, data[0].version) === 1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

status will be fail only for the first run (no pkg in soldeer db yet)

Comment on lines 18 to 19
"soldeer",
["push", `semaphore-protocol-contracts~${contractsLocalVersion}`, "packages/contracts/contracts"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sripwoud sripwoud self-assigned this Jul 8, 2024
@sripwoud sripwoud added feature 🚀 This is enhancing something existing or creating something new dependencies 📦 Upgrades or downgrades in dependencies labels Jul 8, 2024
scripts/clean-apps.ts Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 📦 Upgrades or downgrades in dependencies feature 🚀 This is enhancing something existing or creating something new
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

Publish @semaphore-protocol/contracts as a package in the soldeer package registry.
2 participants