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

fix: generate previews from forked repos #1097

Merged
merged 23 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
489bd26
Update _typos.toml
xiaolou86 Jan 31, 2024
ef59b19
fix: generate previews from forked repos
xiaolou86 Jan 31, 2024
49a8128
fix: generate previews from forked repos
xiaolou86 Jan 31, 2024
40c8b99
fix: generate previews from forked repos
xiaolou86 Jan 31, 2024
f85fa4f
fix: generate previews from forked repos
xiaolou86 Feb 2, 2024
eececaf
fix: generate previews from forked repos
xiaolou86 Feb 2, 2024
f580c2c
fix: generate previews from forked repos
xiaolou86 Feb 2, 2024
6fb296d
fix: generate previews from forked repos
xiaolou86 Feb 2, 2024
dd78a5b
fix: generate previews from forked repos
xiaolou86 Feb 4, 2024
2935c28
fix: generate previews from forked repos
xiaolou86 Feb 4, 2024
8b4b14d
fix: generate previews from forked repos
xiaolou86 Feb 4, 2024
ecbc9e1
fix: generate previews from forked repos
xiaolou86 Feb 4, 2024
9d3f479
fix: generate previews from forked repos
xiaolou86 Feb 4, 2024
e763b48
fix: generate previews from forked repos
xiaolou86 Feb 4, 2024
91fad6b
fix: generate previews from forked repos
xiaolou86 Feb 4, 2024
7cb733b
fix: generate previews from forked repos
xiaolou86 Feb 4, 2024
ee6b315
fix: generate previews from forked repos
xiaolou86 Feb 5, 2024
9699317
Merge branch 'starknet-io:main' into preview-fix
xiaolou86 Feb 5, 2024
e7dc111
fix: generate previews from forked repos
xiaolou86 Feb 5, 2024
7bd7e47
fix: typo
xiaolou86 Feb 5, 2024
2475e85
fix: generate previews from forked repos
xiaolou86 Feb 5, 2024
aa552d8
fix: generate previews from forked repos
xiaolou86 Feb 5, 2024
f6cdd1e
Merge branch 'main' into preview-fix
stoobie Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Pull request workflow

on:
pull_request:
pull_request_target:
types:
- opened
- reopened
- synchronize
branches:
- '*'
- 'main'
- 'dev'

# push:
# branches:
# - main
permissions:
contents: write

jobs:

Expand All @@ -24,7 +28,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
with:
node-version: 16
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- name: Install Node.js
uses: actions/setup-node@v2
Expand Down Expand Up @@ -53,9 +57,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
with:
node-version: 16
ref: gh-pages
USER_TOKEN: ${{ secrets.USER_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Extract PR details
id: pr
Expand Down Expand Up @@ -88,9 +91,9 @@ jobs:
ls -al
echo "Git status:"
git status

git config user.name "GitHub Actions"
git config user.email noreply@github.com

git add .


Expand All @@ -105,7 +108,7 @@ jobs:

# Commit changes
git commit -m "$commit_message"

# Check if commit was successful
if [ $? -eq 0 ]; then
# Debug information
Expand Down Expand Up @@ -140,5 +143,4 @@ jobs:
echo "Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/${{ steps.pr.outputs.PR_ID }}/documentation/ ." >/tmp/comment
gh pr comment ${{ github.event.pull_request.number }} -F /tmp/comment
env:
# USER_TOKEN: "${{ secrets.USER_TOKEN }}"
GH_TOKEN: "${{ github.token }}"
4 changes: 4 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ check-file = false
extend-glob = ["*.adoc"]
check-file = true

[default.extend-words]
# Don't correct the word
afe = "afe"

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[id="serialization_of_types_in_Cairo"]
= Serialization of Cairo types

When you interact with contracts, especially if you are a library or SDK developer that wants to construt transactions, you need to understand how Cairo handles types that are larger than 252 bits so you can correctly formulate the calldata in a transaction.
When you interact with contracts, especially if you are a library or SDK developer that wants to construct transactions, you need to understand how Cairo handles types that are larger than 252 bits so you can correctly formulate the calldata in a transaction.

The field element (`felt252`), which contains 252 bits, is the only actual type in the Cairo VM. So all high-level Cairo types that are larger than 252 bits, such as `u256` or arrays, are ultimately represented by a list of felts. In order to interact with a contract, you need to know how to encode its arguments as a list of felts so you can correctly formulate the calldata in the transaction.
SDKs, such as starknet.js, encode the calldata for you, so you can simply specify any type and the SDK properly formulates the calldata. For example, you don’t need to know that a `u256` value is represented by two `felt252` values. You can simply specify a single integer in your code, and the SDK takes care of the serialization and encoding.
Expand Down