File tree Expand file tree Collapse file tree 11 files changed +29
-9
lines changed 
scenarios/test_codegen/test Expand file tree Collapse file tree 11 files changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,7 @@ module Evm = {
1111  @module ("viem" )
1212  external  fromStringOrThrow : string  =>  t  =  "getAddress" 
1313
14-   // NOTE: We could use a regex for this instead, not sure if it is faster/slower than viem's 'isAddress' function 
15-   //       `/^0x[a-fA-F0-9]{40}$/` 
16-   // ALSO: the function is named to be overshadowed by the one below, so that we don't have to import viem in the handler code 
14+   // NOTE: the function is named to be overshadowed by the one below, so that we don't have to import viem in the handler code 
1715  @module ("viem" )
1816  external  fromStringLowercaseOrThrow : string  =>  bool  =  "isAddress"  
1917
@@ -23,8 +21,6 @@ module Evm = {
2321  // Also, we want a custom error message, which is searchable in our codebase. 
2422  // Validate that the string is a proper address but return a lowercased value 
2523  let  fromStringLowercaseOrThrow  =  string  =>  {
26-     // NOTE: We could use a regex for this and make this function more strict, so it only accepts lower case addresses as input 
27-     //       eg this regex: `/^0x[a-f0-9]{40}$/` 
2824    if  (fromStringLowercaseOrThrow (string )) {
2925      unsafeFromString (string -> Js .String2 .toLowerCase )
3026    } else  {
Original file line number Diff line number Diff line change @@ -19,3 +19,6 @@ unordered_multichain_mode: true
1919#  But be aware that your handlers will run twice,
2020#  so make sure to use Effect API for external calls.
2121preload_handlers : true 
22+ #  Address format for Ethereum addresses: 'checksum' or 'lowercase'
23+ #  using lowercase addresses is slightly faster
24+ address_format : lowercase 
Original file line number Diff line number Diff line change @@ -19,3 +19,6 @@ unordered_multichain_mode: true
1919#  But be aware that your handlers will run twice,
2020#  so make sure to use Effect API for external calls.
2121preload_handlers : true 
22+ #  Address format for Ethereum addresses: 'checksum' or 'lowercase'
23+ #  using lowercase addresses is slightly faster
24+ address_format : lowercase 
Original file line number Diff line number Diff line change @@ -19,3 +19,6 @@ unordered_multichain_mode: true
1919#  But be aware that your handlers will run twice,
2020#  so make sure to use Effect API for external calls.
2121preload_handlers : true 
22+ #  Address format for Ethereum addresses: 'checksum' or 'lowercase'
23+ #  using lowercase addresses is slightly faster
24+ address_format : lowercase 
Original file line number Diff line number Diff line change @@ -30,3 +30,6 @@ unordered_multichain_mode: true
3030#  But be aware that your handlers will run twice,
3131#  so make sure to use Effect API for external calls.
3232preload_handlers : true 
33+ #  Address format for Ethereum addresses: 'checksum' or 'lowercase'
34+ #  using lowercase addresses is slightly faster
35+ address_format : lowercase 
Original file line number Diff line number Diff line change @@ -30,3 +30,6 @@ unordered_multichain_mode: true
3030#  But be aware that your handlers will run twice,
3131#  so make sure to use Effect API for external calls.
3232preload_handlers : true 
33+ #  Address format for Ethereum addresses: 'checksum' or 'lowercase'
34+ #  using lowercase addresses is slightly faster
35+ address_format : lowercase 
Original file line number Diff line number Diff line change @@ -30,3 +30,6 @@ unordered_multichain_mode: true
3030#  But be aware that your handlers will run twice,
3131#  so make sure to use Effect API for external calls.
3232preload_handlers : true 
33+ #  Address format for Ethereum addresses: 'checksum' or 'lowercase'
34+ #  using lowercase addresses is slightly faster
35+ address_format : lowercase 
Original file line number Diff line number Diff line change @@ -16,3 +16,6 @@ networks:
1616#  But be aware that your handlers will run twice,
1717#  so make sure to use Effect API for external calls.
1818preload_handlers : true 
19+ #  Address format for Ethereum addresses: 'checksum' or 'lowercase'
20+ #  using lowercase addresses is slightly faster
21+ address_format : lowercase 
Original file line number Diff line number Diff line change @@ -16,3 +16,6 @@ networks:
1616#  But be aware that your handlers will run twice,
1717#  so make sure to use Effect API for external calls.
1818preload_handlers : true 
19+ #  Address format for Ethereum addresses: 'checksum' or 'lowercase'
20+ #  using lowercase addresses is slightly faster
21+ address_format : lowercase 
Original file line number Diff line number Diff line change @@ -16,3 +16,6 @@ networks:
1616#  But be aware that your handlers will run twice,
1717#  so make sure to use Effect API for external calls.
1818preload_handlers : true 
19+ #  Address format for Ethereum addresses: 'checksum' or 'lowercase'
20+ #  using lowercase addresses is slightly faster
21+ address_format : lowercase 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments