-
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Manual deploy as of commit:385a951cb012b8b3350a351b15348bf1cc942d3c * feat(locksmith, unlock-js, subgraph): Recipient value fix (#13493) * Quick recipient fix * Update introspection.json --------- Co-authored-by: Viacheslav <[email protected]>
- Loading branch information
Showing
107 changed files
with
3,822 additions
and
974 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Fetch and Create Blog Posts | ||
description: Fetches the latest blog posts from the Unlock Protocol blog and creates new posts in the website repository. | ||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Run once per day at midnight | ||
pull_request: | ||
|
||
jobs: | ||
fetch_and_create_posts: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install feedparser requests | ||
- name: Fetch RSS feed and create posts | ||
run: python rss_feed.py | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: "Add new blog posts" | ||
title: "New blog posts from RSS feed" | ||
body: "Automatically generated PR to add new blog posts fetched from the RSS feed." | ||
branch: new-blog-posts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import os | ||
import re | ||
import requests | ||
import feedparser | ||
from datetime import datetime | ||
|
||
# Fetch the RSS feed | ||
rss_url = 'https://paragraph.xyz/api/blogs/rss/@unlockprotocol' | ||
feed = feedparser.parse(rss_url) | ||
|
||
# Create the base directory for storing blog posts | ||
blog_dir = '../../../unlock-protocol-com/blog' | ||
os.makedirs(blog_dir, exist_ok=True) | ||
|
||
# Iterate over each post in the feed | ||
for entry in feed.entries: | ||
# Extract post details | ||
title = entry.title | ||
subtitle = entry.subtitle if 'subtitle' in entry else '' | ||
author_name = entry.author | ||
publish_date = entry.published | ||
description = entry.summary | ||
image_url = entry.image.href if 'image' in entry else '' | ||
|
||
# Generate a slug for the blog post | ||
slug = re.sub(r'[^\w\-_\. ]', '_', title).lower().replace(' ', '_') | ||
|
||
# Create a directory for the blog post images | ||
post_images_dir = f'../../../unlock-protocol-com/public/images/blog/{slug}' | ||
os.makedirs(post_images_dir, exist_ok=True) | ||
|
||
# Fetch and save the image locally | ||
local_image_path = '' | ||
if image_url: | ||
image_filename = os.path.basename(image_url) | ||
local_image_path = os.path.join(post_images_dir, image_filename) | ||
response = requests.get(image_url) | ||
with open(local_image_path, 'wb') as f: | ||
f.write(response.content) | ||
|
||
# Create the post content | ||
post_content = f'''--- | ||
title: "{title}" | ||
subtitle: "{subtitle}" | ||
authorName: "{author_name}" | ||
publishDate: "{publish_date}" | ||
description: "{description}" | ||
image: "../../../unlock-protocol-com/public/images/blog/{slug}/{image_filename}" | ||
--- | ||
{entry.content[0].value} | ||
''' | ||
|
||
# Generate the filename for the blog post | ||
post_filename = f'{slug}.md' | ||
post_file_path = os.path.join(blog_dir, post_filename) | ||
|
||
# Save the post to a file | ||
with open(post_file_path, 'w') as f: | ||
f.write(post_content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Protocol Health Check | ||
description: Check the state of the Unlock Protocol across all chains | ||
|
||
env: | ||
DOCKER_BUILDKIT: 1 | ||
BUILDKIT_PROGRESS: plain | ||
SENTRY_LOG_LEVEL: info | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: yarn | ||
shell: bash | ||
- run: yarn build | ||
shell: bash | ||
- name: Install Sentry CLI | ||
shell: bash | ||
run: npm install @sentry/cli -g | ||
- name: Sentry CLI login | ||
shell: bash | ||
run: sentry-cli login --auth-token $SENTRY_AUTH_TOKEN | ||
- name: Check networks package | ||
run: | | ||
yarn workspace @unlock-protocol/networks check >> networks.log | ||
sentry-cli send-event -m "Networks" --logfile networks.log | ||
shell: bash | ||
- name: Check tokens in networks package | ||
run: | | ||
yarn workspace @unlock-protocol/networks check-tokens >> networks-tokens.log | ||
sentry-cli send-event -m "Networks Tokens" --logfile networks-tokens.log | ||
shell: bash | ||
- name: Check Unlock info | ||
run: | | ||
yarn workspace @unlock-protocol/governance check >> governance.log | ||
sentry-cli send-event -m "Governance" --logfile governance.log | ||
shell: bash | ||
- name: Check Subgraphs | ||
run: | | ||
yarn workspace @unlock-protocol/subgraph check >> subgraph.log | ||
sentry-cli send-event -m "Subgraph" --logfile subgraph.log | ||
shell: bash | ||
- name: Check Team Multisigs | ||
run: | | ||
yarn workspace @unlock-protocol/governance check:multisig >> multisig.log | ||
sentry-cli send-event -m "Multisig" --logfile multisig.log | ||
shell: bash | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Daily checks" | ||
on: | ||
schedule: | ||
# runs at 1am everyday | ||
- cron: '0 1 * * *' | ||
|
||
jobs: | ||
health-check: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Load secrets from 1Password | ||
uses: 1Password/[email protected] | ||
with: | ||
export-env: true | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | ||
SENTRY_AUTH_TOKEN: op://secrets/sentry-health-monitoring/credential | ||
SENTRY_DSN: op://secrets/sentry-health-monitoring/dsn | ||
- name: Health Check of Unlock Protocol | ||
uses: ./.github/actions/health-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Voting Onchain | ||
description: >- | ||
Voting onchain is a way to make decisions in a decentralized way. It is a | ||
process that allows the community to vote on proposals and make decisions | ||
based on the results that are automatically executed by the blockchain. | ||
sidebar_position: 2 | ||
--- | ||
|
||
Preemable: DAO voting happens onchain. Front-ends like [Tally](https://www.tally.xyz/gov/unlock) or Etherscan are optional. They can be replaced by any UI that can interact with the contracts. Please make sure you are [familiar with the voting process](/governance/unlock-dao/#voting)! | ||
There can be various reasons to vote through another channel. Here are the 5 steps to vote by using the Etherscan UI: | ||
|
||
### Step 1 | ||
|
||
Get the Governor contract details from [here](https://docs.unlock-protocol.com/governance/unlock-dao/) and copy them into [Etherscan](https://etherscan.io/) and navigate to the page of the Governor contract. | ||
|
||
### Step 2 | ||
|
||
Now head over to the “Contract” tab and select right underneath “Write as Proxy”: | ||
![Alt text](./voting-onchain/image1.png) | ||
|
||
### Step 3 | ||
|
||
Now, either head over to Tally and grab the Proposal ID from the proposal you wish to vote for: | ||
![Alt text](./voting-onchain/image2.png) | ||
|
||
Or even better, take a look at the “propose” transaction of your proposal here: | ||
![Alt text](./voting-onchain/image3.png) | ||
|
||
From there, navigate to the “Logs” tab to grab the proposal ID: | ||
![Alt text](./voting-onchain/image4.png) | ||
|
||
### Step 4 | ||
|
||
Lastly, please go ahead and return to your open Etherscan tab and paste the Proposal ID into the dedicated field under the castVote function (currently indexed 2). To vote, use the second field and enter either `0` for a vote against the proposal or `1` for a vote in favor of the proposal. | ||
![Alt text](./voting-onchain/image5.png) | ||
|
||
_(PS: You can also use ‘castVoteWithReason’ to add a reason for your vote.)_ | ||
|
||
Make sure you submit the transaction and you are done! You have successfully voted onchain. 🎉 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.