Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
591d885f
Unverified
Commit
591d885f
authored
Dec 12, 2023
by
Matt Solomon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: revert to platform agnostic IFS approach, delete unnecessary comments
parent
670d2ef8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
init_game.sh
op-challenger/scripts/alphabet/init_game.sh
+0
-3
list_claims.sh
op-challenger/scripts/list_claims.sh
+5
-3
list_games.sh
op-challenger/scripts/list_games.sh
+5
-3
No files found.
op-challenger/scripts/alphabet/init_game.sh
View file @
591d885f
...
...
@@ -34,10 +34,7 @@ echo " Block Oracle Proxy at $BLOCK_ORACLE_PROXY"
echo
"----------------------------------------------------------------"
CHARLIE_ADDRESS
=
"0xF45B7537828CB2fffBC69996B054c2Aaf36DC778"
# CHARLIE_KEY="74feb147d72bfae943e6b4e483410933d9e447d5dc47d52432dcc2c1454dabb7"
MALLORY_ADDRESS
=
"0x4641c704a6c743f73ee1f36C7568Fbf4b80681e4"
# MALLORY_KEY="28d7045146193f5f4eeb151c4843544b1b0d30a7ac1680c845a416fac65a7715"
echo
"----------------------------------------------------------------"
echo
" - Fetching balance of the sponsor"
...
...
op-challenger/scripts/list_claims.sh
View file @
591d885f
...
...
@@ -11,9 +11,11 @@ echo "Claim count: ${COUNT}"
for
i
in
$(
seq
0
"
${
COUNT
}
"
)
do
CLAIM
=
$(
cast call
--rpc-url
"
${
RPC
}
"
"
${
GAME_ADDR
}
"
'claimData(uint256) returns(uint32 parentIndex, bool countered, bytes32 claim, uint128 position, uint128 clock)'
"
${
i
}
"
)
# Use read -ra to safely split the string into an array named CLAIM, assuming
# data is newline-separated.
IFS
=
$'
\n
'
read
-ra
CLAIM
<<<
"
$CLAIM
"
SAVEIFS
=
$IFS
# Save current IFS (Internal Field Separator)
IFS
=
$'
\n
'
# Change IFS to newline char
# shellcheck disable=SC2206
CLAIM
=(
$CLAIM
)
# split the string into an array by the same name
IFS
=
$SAVEIFS
# Restore original IFS
echo
"
${
i
}
Parent:
${
CLAIM
[0]
}
Countered:
${
CLAIM
[1]
}
Claim:
${
CLAIM
[2]
}
Position:
${
CLAIM
[3]
}
Clock
${
CLAIM
[4]
}
"
done
op-challenger/scripts/list_games.sh
View file @
591d885f
...
...
@@ -15,9 +15,11 @@ fi
for
i
in
$(
seq
0
"
${
COUNT
}
"
)
do
GAME
=
$(
cast call
--rpc-url
"
${
RPC
}
"
"
${
FACTORY_ADDR
}
"
'gameAtIndex(uint256) returns(uint8, uint64, address)'
"
${
i
}
"
)
# Use read -ra to safely split the string into an array named GAME, assuming
# data is newline-separated.
IFS
=
$'
\n
'
read
-ra
GAME
<<<
"
$GAME
"
SAVEIFS
=
$IFS
# Save current IFS (Internal Field Separator)
IFS
=
$'
\n
'
# Change IFS to newline char
# shellcheck disable=SC2206
GAME
=(
$GAME
)
# split the string into an array by the same name
IFS
=
$SAVEIFS
# Restore original IFS
GAME_ADDR
=
"
${
GAME
[2]
}
"
CLAIMS
=
$(
cast call
--rpc-url
"
${
RPC
}
"
"
${
GAME_ADDR
}
"
"claimDataLen() returns(uint256)"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment