@@ -6,7 +6,11 @@ DEFAULT_IMPL_ID="0"
66
77get_impl_id () {
88 if [ " $token_standard " == " ERC721" ] && [ " $use_erc721c " == " true" ]; then
9- echo " 2" # ERC721C implementation ID
9+ if [ " $chain_id " == " 2741" ]; then
10+ echo " 3" # ERC721C implementation ID / abstract
11+ else
12+ echo " 1" # ERC721C implementation ID / all other chains
13+ fi
1014 else
1115 echo $DEFAULT_IMPL_ID
1216 fi
@@ -53,6 +57,7 @@ deploy_contract() {
5357 " $standard_id " \
5458 " $SIGNER " \
5559 $impl_id \
60+ $( zksync_flag) \
5661 $password \
5762 $value \
5863 --json)
@@ -79,7 +84,7 @@ deploy_contract() {
7984 set_transfer_list
8085 fi
8186
82- if [ $is_icreatortoken -eq 0 ] || [ " $token_standard " == " ERC1155 " ] ; then
87+ if [ $is_icreatortoken -eq 0 ]; then
8388 if gum confirm " Would you like to freeze the collection?" --default=true; then
8489 freeze_contract
8590 fi
@@ -105,7 +110,7 @@ supports_icreatortoken() {
105110set_transfer_validator () {
106111 tf_address=$( get_transfer_validator_address $chain_id )
107112 echo " Setting transfer validator to $tf_address ..."
108- output=$( cast send $contract_address " setTransferValidator(address)" $tf_address $password --rpc-url " $RPC_URL " --json)
113+ output=$( cast send $contract_address " setTransferValidator(address)" $tf_address $password $( zksync_flag ) --rpc-url " $RPC_URL " --json)
109114 print_transaction_hash $output
110115 echo " Transfer validator set."
111116 echo " "
@@ -114,7 +119,7 @@ set_transfer_validator() {
114119set_transfer_list () {
115120 tf_list_id=$( get_transfer_validator_list_id $chain_id )
116121 echo " Setting transfer list to list ID $tf_list_id ..."
117- output=$( cast send $tf_address " applyListToCollection(address,uint120)" $contract_address $tf_list_id $password --rpc-url " $RPC_URL " --json)
122+ output=$( cast send $tf_address " applyListToCollection(address,uint120)" $contract_address $tf_list_id $password $( zksync_flag ) --rpc-url " $RPC_URL " --json)
118123 print_transaction_hash $output
119124 echo " Transfer list set."
120125 echo " "
@@ -142,7 +147,7 @@ freeze_thaw_contract() {
142147freeze_contract () {
143148 echo " Freezing contract... this will take a moment."
144149
145- output=$( cast send $contract_address " setTransferable(bool)" false $password --rpc-url " $RPC_URL " --json)
150+ output=$( cast send $contract_address " setTransferable(bool)" false $password $( zksync_flag ) --rpc-url " $RPC_URL " --json)
146151
147152 print_transaction_hash $output
148153 echo " Token transfers frozen."
@@ -152,7 +157,7 @@ freeze_contract() {
152157thaw_contract () {
153158 echo " Thawing contract... this will take a moment."
154159
155- output=$( cast send $contract_address " setTransferable(bool)" true $password --rpc-url " $RPC_URL " --json)
160+ output=$( cast send $contract_address " setTransferable(bool)" true $password $( zksync_flag ) --rpc-url " $RPC_URL " --json)
156161
157162 print_transaction_hash $output
158163 echo " Token transfers thawed."
@@ -233,6 +238,7 @@ setup_contract() {
233238 " $royalty_receiver " \
234239 " $royalty_fee " \
235240 $password \
241+ $( zksync_flag) \
236242 --rpc-url " $RPC_URL " \
237243 --json)
238244
@@ -266,6 +272,7 @@ set_base_uri_contract() {
266272 $base_uri_selector \
267273 $base_uri \
268274 $password \
275+ $( zksync_flag) \
269276 --chain-id $chain_id \
270277 --rpc-url " $RPC_URL " \
271278 --json)
@@ -317,6 +324,7 @@ set_global_wallet_limit_contract() {
317324 " $global_wallet_limit_selector " \
318325 $token_id \
319326 " $global_wallet_limit " \
327+ $( zksync_flag) \
320328 $password \
321329 --rpc-url " $RPC_URL " \
322330 --json)
@@ -373,6 +381,7 @@ set_max_mintable_supply_contract() {
373381 $token_id \
374382 $max_mintable_supply \
375383 $password \
384+ $( zksync_flag) \
376385 --chain-id $chain_id \
377386 --rpc-url " $RPC_URL " \
378387 --json)
@@ -415,6 +424,7 @@ set_mintable_contract() {
415424 $set_mintable_selector \
416425 $mintable \
417426 $password \
427+ $( zksync_flag) \
418428 --chain-id $chain_id \
419429 --rpc-url " $RPC_URL " \
420430 --json)
@@ -468,6 +478,7 @@ set_stages_contract() {
468478 " $set_stages_selector " \
469479 " $stages_data " \
470480 $password \
481+ $( zksync_flag) \
471482 --rpc-url " $RPC_URL " \
472483 --json)
473484
@@ -504,6 +515,7 @@ set_cosigner_contract() {
504515 $set_cosigner_selector \
505516 $cosigner \
506517 $password \
518+ $( zksync_flag) \
507519 --chain-id $chain_id \
508520 --rpc-url " $RPC_URL " \
509521 --json)
@@ -541,6 +553,7 @@ set_timestamp_expiry_contract() {
541553 $timestamp_expiry_selector \
542554 $timestamp_expiry \
543555 $password \
556+ $( zksync_flag) \
544557 --chain-id $chain_id \
545558 --rpc-url " $RPC_URL " \
546559 --json)
@@ -590,6 +603,7 @@ transfer_ownership_contract() {
590603 $complete_ownership_handover_selector \
591604 $new_owner \
592605 $password \
606+ $( zksync_flag) \
593607 --chain-id $chain_id \
594608 --rpc-url " $RPC_URL " \
595609 --json)
@@ -622,6 +636,7 @@ set_token_uri_suffix_contract() {
622636 $token_uri_suffix_selector \
623637 $token_uri_suffix \
624638 $password \
639+ $( zksync_flag) \
625640 --chain-id $chain_id \
626641 --rpc-url " $RPC_URL " \
627642 --json)
@@ -660,6 +675,7 @@ set_uri_contract() {
660675 $set_uri_selector \
661676 $uri \
662677 $password \
678+ $( zksync_flag) \
663679 --chain-id $chain_id \
664680 --rpc-url " $RPC_URL " \
665681 --json)
@@ -705,6 +721,7 @@ set_royalties_contract() {
705721 $receiver \
706722 $fee_numerator \
707723 $password \
724+ $( zksync_flag) \
708725 --chain-id $chain_id \
709726 --rpc-url " $RPC_URL " \
710727 --json)
@@ -758,6 +775,7 @@ owner_mint_contract() {
758775 " $mint_selector " \
759776 $mint_args \
760777 $password \
778+ $( zksync_flag) \
761779 --rpc-url " $RPC_URL " \
762780 --json)
763781
@@ -815,6 +833,7 @@ add_authorized_minter_contract() {
815833 " $add_authorized_minter_selector " \
816834 $minter \
817835 $password \
836+ $( zksync_flag) \
818837 --chain-id $chain_id \
819838 --rpc-url " $RPC_URL " \
820839 --json)
@@ -847,6 +866,7 @@ remove_authorized_minter_contract() {
847866 " $remove_authorized_minter_selector " \
848867 $minter \
849868 $password \
869+ $( zksync_flag) \
850870 --chain-id $chain_id \
851871 --rpc-url " $RPC_URL " \
852872 --json)
@@ -883,6 +903,7 @@ set_cosigner_contract() {
883903 " $set_cosigner_selector " \
884904 $cosigner \
885905 $password \
906+ $( zksync_flag) \
886907 --chain-id $chain_id \
887908 --rpc-url " $RPC_URL " \
888909 --json)
0 commit comments