-
Notifications
You must be signed in to change notification settings - Fork 27
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
Tests use permissionless l1 #641
Changes from all commits
651ee90
9a46f4f
9012825
a47a345
fb8af19
68af482
ad53a47
f4d418d
41b1f13
8a21d86
0d8309e
2995f90
1c9e89f
064f849
1fd68ff
c1fc63c
f53242c
f7629d2
8e4025d
9c783f5
19f1047
5b3a79c
fdd3e57
e632c55
ea2c4d5
106a220
d0fa517
4dab87e
c3e06c8
452b448
34d761f
5e57afc
1bd1eda
226937a
997097c
47ee410
24dd273
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,8 @@ export ARCH=$(uname -m) | |
echo "ARCH set to $ARCH" | ||
|
||
DEFAULT_CONTRACT_LIST="TeleporterMessenger TeleporterRegistry ExampleERC20 ExampleRewardCalculator TestMessenger ValidatorSetSig NativeTokenStakingManager ERC20TokenStakingManager PoAValidatorManager | ||
TokenHome TokenRemote ERC20TokenHome ERC20TokenHomeUpgradeable ERC20TokenRemote ERC20TokenRemoteUpgradeable NativeTokenHome NativeTokenHomeUpgradeable NativeTokenRemote NativeTokenRemoteUpgradeable WrappedNativeToken MockERC20SendAndCallReceiver MockNativeSendAndCallReceiver ExampleERC20Decimals" | ||
|
||
TokenHome TokenRemote ERC20TokenHome ERC20TokenHomeUpgradeable ERC20TokenRemote ERC20TokenRemoteUpgradeable NativeTokenHome NativeTokenHomeUpgradeable NativeTokenRemote NativeTokenRemoteUpgradeable | ||
WrappedNativeToken MockERC20SendAndCallReceiver MockNativeSendAndCallReceiver ExampleERC20Decimals IValidatorManager IPoSValidatorManager" | ||
PROXY_LIST="TransparentUpgradeableProxy ProxyAdmin" | ||
|
||
SUBNET_EVM_LIST="INativeMinter" | ||
|
@@ -139,21 +139,30 @@ function generate_bindings() { | |
|
||
# Filter out the contract we are generating bindings for | ||
filtered_contracts=$(remove_matching_string $contracts $contract_name) | ||
|
||
# Filter out external libraries | ||
for lib in $EXTERNAL_LIBS; do | ||
filtered_contracts=$(remove_matching_string $filtered_contracts $lib) | ||
done | ||
|
||
echo "Generating Go bindings for $contract_name..." | ||
|
||
gen_path=$TELEPORTER_PATH/abi-bindings/go/$dir/$contract_name | ||
mkdir -p $gen_path | ||
|
||
$GOPATH/bin/abigen --pkg $(convertToLower $contract_name) \ | ||
--combined-json $combined_json \ | ||
--type $contract_name \ | ||
--out $gen_path/$contract_name.go \ | ||
--exc $filtered_contracts | ||
echo "Generating Go bindings for $contract_name..." | ||
|
||
if [ -z "$filtered_contracts" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This addresses an edge case in which the only contract in the combined JSON is the contract to compile itself. In that case, there are no contracts to exclude. |
||
echo "No external libraries found" | ||
$GOPATH/bin/abigen --pkg $(convertToLower $contract_name) \ | ||
--combined-json $combined_json \ | ||
--type $contract_name \ | ||
--out $gen_path/$contract_name.go | ||
else | ||
# Filter out external libraries | ||
for lib in $EXTERNAL_LIBS; do | ||
filtered_contracts=$(remove_matching_string $filtered_contracts $lib) | ||
done | ||
|
||
$GOPATH/bin/abigen --pkg $(convertToLower $contract_name) \ | ||
--combined-json $combined_json \ | ||
--type $contract_name \ | ||
--out $gen_path/$contract_name.go \ | ||
--exc $filtered_contracts | ||
fi | ||
|
||
echo "Done generating Go bindings for $contract_name." | ||
done | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this to allow the deployment utility to return an
IPoSValidatorManager
object, and recover theERC20
instance after the fact. It also seems reasonable that use cases will emerge that will want to access the staked asset programatically.