Skip to content

Commit

Permalink
chore(controller): merge from release/v0.2.0 (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
ducthotran2010 authored Oct 24, 2023
2 parents b072f0c + 775ad22 commit 1fdb55e
Show file tree
Hide file tree
Showing 85 changed files with 68,626 additions and 396 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/render-template@v1.4
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 }}
50 changes: 50 additions & 0 deletions .github/workflows/create-PR-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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:
mergeRelease2FeatureRepo:
runs-on: ubuntu-latest
strategy:
matrix:
branch_name: [feature/rns-unified, feature/controller, feature/domain-price, feature/auction, feature/public-resolver, feature/ci, feature/reverse-registrar]
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/render-template@v1.4
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
[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
527 changes: 527 additions & 0 deletions broadcast/20231015_Deploy.s.sol/2021/run-1697372924.json

Large diffs are not rendered by default.

2,036 changes: 2,036 additions & 0 deletions broadcast/20231015_Deploy.s.sol/2021/run-1697372932.json

Large diffs are not rendered by default.

2,036 changes: 2,036 additions & 0 deletions broadcast/20231015_Deploy.s.sol/2021/run-latest.json

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784642.json

Large diffs are not rendered by default.

111 changes: 111 additions & 0 deletions broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784648.json

Large diffs are not rendered by default.

111 changes: 111 additions & 0 deletions broadcast/20231020_RNSUpgrade.s.sol/2021/run-latest.json

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions broadcast/20231024_UpgradeAuction.s.sol/2021/run-1698122959.json

Large diffs are not rendered by default.

111 changes: 111 additions & 0 deletions broadcast/20231024_UpgradeAuction.s.sol/2021/run-1698122966.json

Large diffs are not rendered by default.

111 changes: 111 additions & 0 deletions broadcast/20231024_UpgradeAuction.s.sol/2021/run-latest.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

166 changes: 166 additions & 0 deletions broadcast/20231024_UpgradeDomainPrice.s.sol/2021/run-1698139063.json

Large diffs are not rendered by default.

166 changes: 166 additions & 0 deletions broadcast/20231024_UpgradeDomainPrice.s.sol/2021/run-latest.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

111 changes: 111 additions & 0 deletions broadcast/20231024_UpgradeRNSUnified.s.sol/2021/run-1698142390.json

Large diffs are not rendered by default.

111 changes: 111 additions & 0 deletions broadcast/20231024_UpgradeRNSUnified.s.sol/2021/run-latest.json

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Source (or "dot") the .env file to load environment variables
if [ -f .env ]; then
source .debug.env
else
echo "Error: .debug.env file not found."
fi

verify_arg=""
extra_argument=""
op_command=""

for arg in "$@"; do
case $arg in
--trezor)
op_command=""
extra_argument+=trezor@
;;
--broadcast)
op_command="op run --env-file="./.env" --"
;;
--log)
set -- "${@/#--log/}"
extra_argument+=log@
;;
*) ;;
esac
done

# Remove the @ character from the end of extra_argument
extra_argument="${extra_argument%%@}"

echo Debug Tx...
echo From: ${FROM}
echo To: ${TO}
echo Value: ${VALUE}
echo Calldata:
cast pretty-calldata ${CALLDATA}
calldata=$(cast calldata 'debug(uint256,address,address,uint256,bytes)', ${BLOCK} ${FROM} ${TO} ${VALUE} ${CALLDATA})
${op_command} forge script ${verify_arg} --legacy ${@} script/Debug.s.sol --sig 'run(bytes,string)' ${calldata} "${extra_argument}"
1 change: 1 addition & 0 deletions deployments/ronin-mainnet/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2020
1 change: 1 addition & 0 deletions deployments/ronin-testnet/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2021
Loading

0 comments on commit 1fdb55e

Please sign in to comment.