Skip to content

Commit

Permalink
chore: merge from branch 'release/v0.2.0' (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
ducthotran2010 authored Nov 16, 2023
2 parents eae2ada + eb0cf65 commit c9970e8
Show file tree
Hide file tree
Showing 187 changed files with 221,819 additions and 359 deletions.
10 changes: 10 additions & 0 deletions .debug.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Fork block number to debug
BLOCK=0x0
# Caller
FROM=0x0000000000000000000000000000000000000000
# Callee
TO=0x0000000000000000000000000000000000000000
# Sent Value
VALUE=0x27cdb0997a65b2de99
# Call Data
CALLDATA=0x0
2 changes: 2 additions & 0 deletions .github/template/create-pull-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Description
PR to merge from [{{ .fromBranch }}](/axieinfinity/rns-contracts/tree/{{ .fromBranch }}) to [{{ .toBranch }}](/axieinfinity/rns-contracts/tree/{{ .toBranch }}).
50 changes: 50 additions & 0 deletions .github/workflows/create-PR-implement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Create Pull Request From Implement To Feature
on:
push:
branches:
- 'implement-feature/**'
- 'implement-feature/**/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

env:
HEAD_BRANCH: ${{ github.head_ref || github.ref_name }}

jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- name: Set env
run: |
echo "FEATURE_NAME=$(echo ${HEAD_BRANCH} | cut -d'/' -f2)" >> $GITHUB_ENV
echo "FEATURE_BRANCH=feature/$(echo ${HEAD_BRANCH} | cut -d'/' -f2)" >> $GITHUB_ENV
echo "IMPLEMENT_NAME=$(echo ${HEAD_BRANCH} | cut -d'/' -f3)" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
ref: ${{env.FEATURE_BRANCH}}

- name: Reset promotion branch
run: |
git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH}
git reset --hard ${HEAD_BRANCH}
- name: Render template
id: template
uses: chuhlomin/[email protected]
with:
template: .github/template/create-pull-request.md
vars: |
fromBranch: ${{env.HEAD_BRANCH}}
toBranch: ${{ env.FEATURE_BRANCH }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: ${{ env.HEAD_BRANCH }}
base: ${{env.FEATURE_BRANCH}}
labels: automated PR
title: 'feat(${{env.FEATURE_NAME}}): implement `${{env.IMPLEMENT_NAME}}`'
body: ${{ steps.template.outputs.result }}
84 changes: 84 additions & 0 deletions .github/workflows/create-PR-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Create Pull Request From Release to Feature
on:
push:
branches:
- 'release/*'
- 'release*/*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

env:
HEAD_BRANCH: ${{ github.head_ref || github.ref_name }}

jobs:
fetchAllFeatureBranches:
runs-on: ubuntu-latest

steps:
- id: step1
name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- id: step2
name: List all the remote feature branches
run: |
branches=$(git branch -r | grep -E '.*origin\/feature\/.*' | sed -e "s/.*origin\///" | tr "\n" " ")
JSON="["
for branch in ${branches[@]}; do
echo $branch
JSONline="\"$branch\","
# we don't need to iterate on the same branch over and over, so
# onnly include it when it wasn't included
if [[ "$JSON" != *"$JSONline"* ]]; then
JSON="$JSON$JSONline"
fi
done
# Remove last "," and add the closing bracket
if [[ $JSON == *, ]]; then
JSON="${JSON%?}"
fi
JSON="$JSON]"
echo $JSON
echo "BRANCHES={\"branch_name\": $( echo "$JSON" )}" >> "$GITHUB_OUTPUT"
outputs:
BRANCHES: ${{ steps.step2.outputs.BRANCHES }}

mergeRelease2FeatureRepo:
runs-on: ubuntu-latest
needs: fetchAllFeatureBranches
strategy:
matrix: ${{ fromJSON(needs.fetchAllFeatureBranches.outputs.BRANCHES) }}
steps:
- name: Set env
run: |
echo "PR_BRANCH=merge/${HEAD_BRANCH}-${{matrix.branch_name}}" >> $GITHUB_ENV
echo "FEATURE_NAME=$(echo ${{matrix.branch_name}} | cut -d'/' -f2)" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
ref: ${{matrix.branch_name}}
- name: Reset promotion branch
run: |
git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH}
git reset --hard ${HEAD_BRANCH}
- name: Render template
id: template
uses: chuhlomin/[email protected]
with:
template: .github/template/create-pull-request.md
vars: |
fromBranch: ${{env.HEAD_BRANCH}}
toBranch: ${{matrix.branch_name}}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
labels: automated PR
delete-branch: true
title: 'chore(`${{env.FEATURE_NAME}}`): merge from `${{env.HEAD_BRANCH}}`'
body: ${{ steps.template.outputs.result }}
branch: ${{env.PR_BRANCH}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ docs/
# Dotenv file
.env
.vscode
.debug.env

node_modules/
yarn-error.log
Expand Down
18 changes: 18 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,21 @@
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
[submodule "lib/contract-template"]
path = lib/contract-template
url = https://github.com/axieinfinity/contract-template
[submodule "lib/ens-contracts"]
path = lib/ens-contracts
url = https://github.com/ensdomains/ens-contracts
[submodule "lib/buffer"]
path = lib/buffer
url = https://github.com/ensdomains/buffer
[submodule "lib/pyth-sdk-solidity"]
path = lib/pyth-sdk-solidity
url = https://github.com/pyth-network/pyth-sdk-solidity
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/vectorized/solady
[submodule "lib/foundry-deployment-kit"]
path = lib/foundry-deployment-kit
url = https://github.com/axieinfinity/foundry-deployment-kit
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"transactions": [
{
"hash": "0xd736ab88f74574d14472989ed45274badea3991b1e17e7e7660a57a58c896aba",
"transactionType": "CALL",
"contractName": null,
"contractAddress": null,
"function": null,
"arguments": null,
"transaction": {
"type": "0x00",
"from": "0x0f68edbe14c8f68481771016d7e2871d6a35de11",
"to": "0xd55e6d80aea1ff4650bc952c1653ab3cf1b940a9",
"value": "0x0",
"data": "0xdb5e1ec6000000000000000000000000000000000000000000000000000000008b075d10000000000000000000000000000000000000000000000000000000008b08ae90",
"nonce": "0x726"
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": null,
"transactionType": "CALL",
"contractName": null,
"contractAddress": null,
"function": null,
"arguments": null,
"transaction": {
"type": "0x00",
"from": "0x0f68edbe14c8f68481771016d7e2871d6a35de11",
"to": "0xd55e6d80aea1ff4650bc952c1653ab3cf1b940a9",
"value": "0x0",
"data": "0x777b0a18039f71a14110d644e25ab67e0da29ae3d93f9f372f5a2f7775cafe4e856e8d81000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002601dccd6a440eb22898b2a72036566e9e57f5b7fdfd11c2e2ede7265aec13f45832f650be9aa2ded8d1a23a429039e3d03abde98c83c2d66d350779253f2ad6d000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x727"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [],
"libraries": [],
"pending": [
"0xd736ab88f74574d14472989ed45274badea3991b1e17e7e7660a57a58c896aba"
],
"returns": {},
"timestamp": 1700031427,
"chain": 2020,
"multi": false,
"commit": "4e0ae07"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"transactions": [
{
"hash": "0xb584da5fec2d653dd862c3842d4a29ec97523c1b46976e640d8f29ad3dba1043",
"transactionType": "CALL",
"contractName": null,
"contractAddress": null,
"function": null,
"arguments": null,
"transaction": {
"type": "0x00",
"from": "0x0f68edbe14c8f68481771016d7e2871d6a35de11",
"to": "0xd55e6d80aea1ff4650bc952c1653ab3cf1b940a9",
"value": "0x0",
"data": "0xdb5e1ec6000000000000000000000000000000000000000000000000000000008b075d10000000000000000000000000000000000000000000000000000000008b08ae90",
"nonce": "0x727"
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": "0x5c0a89e8cb83686860de603736b4987a8af39719d12d70734386aa0f7d0f5e92",
"transactionType": "CALL",
"contractName": null,
"contractAddress": null,
"function": null,
"arguments": null,
"transaction": {
"type": "0x00",
"from": "0x0f68edbe14c8f68481771016d7e2871d6a35de11",
"to": "0xd55e6d80aea1ff4650bc952c1653ab3cf1b940a9",
"value": "0x0",
"data": "0x777b0a18039f71a14110d644e25ab67e0da29ae3d93f9f372f5a2f7775cafe4e856e8d81000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002601dccd6a440eb22898b2a72036566e9e57f5b7fdfd11c2e2ede7265aec13f45832f650be9aa2ded8d1a23a429039e3d03abde98c83c2d66d350779253f2ad6d000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x728"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [],
"libraries": [],
"pending": [
"0xb584da5fec2d653dd862c3842d4a29ec97523c1b46976e640d8f29ad3dba1043",
"0x5c0a89e8cb83686860de603736b4987a8af39719d12d70734386aa0f7d0f5e92"
],
"returns": {},
"timestamp": 1700031514,
"chain": 2020,
"multi": false,
"commit": "4e0ae07"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"transactions": [
{
"hash": "0xb584da5fec2d653dd862c3842d4a29ec97523c1b46976e640d8f29ad3dba1043",
"transactionType": "CALL",
"contractName": null,
"contractAddress": null,
"function": null,
"arguments": null,
"transaction": {
"type": "0x00",
"from": "0x0f68edbe14c8f68481771016d7e2871d6a35de11",
"to": "0xd55e6d80aea1ff4650bc952c1653ab3cf1b940a9",
"value": "0x0",
"data": "0xdb5e1ec6000000000000000000000000000000000000000000000000000000008b075d10000000000000000000000000000000000000000000000000000000008b08ae90",
"nonce": "0x727"
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": "0x5c0a89e8cb83686860de603736b4987a8af39719d12d70734386aa0f7d0f5e92",
"transactionType": "CALL",
"contractName": null,
"contractAddress": null,
"function": null,
"arguments": null,
"transaction": {
"type": "0x00",
"from": "0x0f68edbe14c8f68481771016d7e2871d6a35de11",
"to": "0xd55e6d80aea1ff4650bc952c1653ab3cf1b940a9",
"value": "0x0",
"data": "0x777b0a18039f71a14110d644e25ab67e0da29ae3d93f9f372f5a2f7775cafe4e856e8d81000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002601dccd6a440eb22898b2a72036566e9e57f5b7fdfd11c2e2ede7265aec13f45832f650be9aa2ded8d1a23a429039e3d03abde98c83c2d66d350779253f2ad6d000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x728"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"transactionHash": "0xb584da5fec2d653dd862c3842d4a29ec97523c1b46976e640d8f29ad3dba1043",
"transactionIndex": "0x1",
"blockHash": "0x4507aef24a928218b777600e0a06a14e67f76b9f5761078a05513277a13d7be7",
"blockNumber": "0x1c0a0d8",
"from": "0x0F68eDBE14C8f68481771016d7E2871d6a35DE11",
"to": "0xD55e6d80aeA1FF4650BC952C1653ab3CF1b940A9",
"cumulativeGasUsed": "0x69b6a",
"gasUsed": "0x73c8",
"contractAddress": null,
"logs": [
{
"address": "0xD55e6d80aeA1FF4650BC952C1653ab3CF1b940A9",
"topics": [
"0xd8960c7efc6464cdd8dd07f4dc149b0a33bf7f60bf357838722d5b80f988fb1b",
"0x039f71a14110d644e25ab67e0da29ae3d93f9f372f5a2f7775cafe4e856e8d81"
],
"data": "0x000000000000000000000000000000000000000000000000000000008b075d10000000000000000000000000000000000000000000000000000000008b08ae90",
"blockHash": "0x4507aef24a928218b777600e0a06a14e67f76b9f5761078a05513277a13d7be7",
"blockNumber": "0x1c0a0d8",
"transactionHash": "0xb584da5fec2d653dd862c3842d4a29ec97523c1b46976e640d8f29ad3dba1043",
"transactionIndex": "0x1",
"logIndex": "0x5",
"removed": false
}
],
"status": "0x1",
"logsBloom": "0x00010000000000000000100000000000000000000000000000000000000000000000000000000000000000000000200000000000000100000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080400000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x0",
"effectiveGasPrice": "0x4a817c800"
},
{
"transactionHash": "0x5c0a89e8cb83686860de603736b4987a8af39719d12d70734386aa0f7d0f5e92",
"transactionIndex": "0x2",
"blockHash": "0x4507aef24a928218b777600e0a06a14e67f76b9f5761078a05513277a13d7be7",
"blockNumber": "0x1c0a0d8",
"from": "0x0F68eDBE14C8f68481771016d7E2871d6a35DE11",
"to": "0xD55e6d80aeA1FF4650BC952C1653ab3CF1b940A9",
"cumulativeGasUsed": "0x70f83",
"gasUsed": "0x7419",
"contractAddress": null,
"logs": [
{
"address": "0xD55e6d80aeA1FF4650BC952C1653ab3CF1b940A9",
"topics": [
"0x9a845a1c4235343a450f5e39d4179b7e2a6c9586c02bff45d956717f4a19dd94",
"0x039f71a14110d644e25ab67e0da29ae3d93f9f372f5a2f7775cafe4e856e8d81"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002601dccd6a440eb22898b2a72036566e9e57f5b7fdfd11c2e2ede7265aec13f45832f650be9aa2ded8d1a23a429039e3d03abde98c83c2d66d350779253f2ad6d000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x4507aef24a928218b777600e0a06a14e67f76b9f5761078a05513277a13d7be7",
"blockNumber": "0x1c0a0d8",
"transactionHash": "0x5c0a89e8cb83686860de603736b4987a8af39719d12d70734386aa0f7d0f5e92",
"transactionIndex": "0x2",
"logIndex": "0x6",
"removed": false
}
],
"status": "0x1",
"logsBloom": "0x00000000000000000000100000000040000000000000000000000000000000040000000000000000000000000000200000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000080400000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x0",
"effectiveGasPrice": "0x4a817c800"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1700031521,
"chain": 2020,
"multi": false,
"commit": "4e0ae07"
}
Loading

0 comments on commit c9970e8

Please sign in to comment.