@@ -31,84 +31,84 @@ private static System.Collections.Generic.List<CompilationException>
3131 var transferMethod = manifest . Abi . GetMethod ( "transfer" , 4 ) ;
3232
3333 // Check symbol method
34- if ( symbolMethod == null )
34+ if ( symbolMethod is null )
3535 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
3636 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: symbol, it is not found in the ABI") ) ;
3737
3838 if ( symbolMethod is { Safe : false } )
3939 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
4040 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: symbol, it is not safe, you should add a 'Safe' attribute to the symbol method") ) ;
4141
42- if ( symbolMethod != null && symbolMethod . ReturnType != ContractParameterType . String )
42+ if ( symbolMethod is not null && symbolMethod . ReturnType != ContractParameterType . String )
4343 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
4444 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: symbol, it's return type is not a String") ) ;
4545
4646 // Check decimals method
47- if ( decimalsMethod == null )
47+ if ( decimalsMethod is null )
4848 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
4949 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: decimals, it is not found in the ABI") ) ;
5050
5151 if ( decimalsMethod is { Safe : false } )
5252 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
5353 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: decimals, it is not safe, you should add a 'Safe' attribute to the decimals method") ) ;
5454
55- if ( decimalsMethod != null && decimalsMethod . ReturnType != ContractParameterType . Integer )
55+ if ( decimalsMethod is not null && decimalsMethod . ReturnType != ContractParameterType . Integer )
5656 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
5757 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: decimals, it's return type is not an Integer") ) ;
5858
5959 // Check totalSupply method
60- if ( totalSupplyMethod == null )
60+ if ( totalSupplyMethod is null )
6161 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
6262 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: totalSupply, it is not found in the ABI") ) ;
6363
6464 if ( totalSupplyMethod is { Safe : false } )
6565 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
6666 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: totalSupply, it is not safe, you should add a 'Safe' attribute to the totalSupply method") ) ;
6767
68- if ( totalSupplyMethod != null && totalSupplyMethod . ReturnType != ContractParameterType . Integer )
68+ if ( totalSupplyMethod is not null && totalSupplyMethod . ReturnType != ContractParameterType . Integer )
6969 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
7070 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: totalSupply, it's return type is not an Integer") ) ;
7171
7272 // Check balanceOf method
73- if ( balanceOfMethod == null )
73+ if ( balanceOfMethod is null )
7474 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
7575 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: balanceOf, it is not found in the ABI") ) ;
7676
7777 if ( balanceOfMethod is { Safe : false } )
7878 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
7979 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: balanceOf, it is not safe, you should add a 'Safe' attribute to the balanceOf method") ) ;
8080
81- if ( balanceOfMethod != null && balanceOfMethod . ReturnType != ContractParameterType . Integer )
81+ if ( balanceOfMethod is not null && balanceOfMethod . ReturnType != ContractParameterType . Integer )
8282 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
8383 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: balanceOf, it's return type is not an Integer") ) ;
8484
85- if ( balanceOfMethod != null && balanceOfMethod . Parameters . Length != 1 )
85+ if ( balanceOfMethod is not null && balanceOfMethod . Parameters . Length != 1 )
8686 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
8787 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: balanceOf, it's parameters length is not 1") ) ;
8888
89- if ( balanceOfMethod != null && balanceOfMethod . Parameters [ 0 ] . Type != ContractParameterType . Hash160 )
89+ if ( balanceOfMethod is not null && balanceOfMethod . Parameters [ 0 ] . Type != ContractParameterType . Hash160 )
9090 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
9191 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: balanceOf, it's parameter type is not a Hash160") ) ;
9292
9393 // Check transfer method
94- if ( transferMethod == null )
94+ if ( transferMethod is null )
9595 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
9696 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: transfer, it is not found in the ABI") ) ;
9797
9898 // Note: transfer method should NOT be safe as per NEP-17 standard
99- if ( transferMethod != null && transferMethod . Safe )
99+ if ( transferMethod is not null && transferMethod . Safe )
100100 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
101101 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: transfer, it should not be marked as Safe") ) ;
102102
103- if ( transferMethod != null && transferMethod . ReturnType != ContractParameterType . Boolean )
103+ if ( transferMethod is not null && transferMethod . ReturnType != ContractParameterType . Boolean )
104104 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
105105 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: transfer, it's return type is not a Boolean") ) ;
106106
107- if ( transferMethod != null && transferMethod . Parameters . Length != 4 )
107+ if ( transferMethod is not null && transferMethod . Parameters . Length != 4 )
108108 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
109109 $ "Incomplete or unsafe NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: transfer, it's parameters length is not 4") ) ;
110110
111- if ( transferMethod != null && transferMethod . Parameters . Length == 4 )
111+ if ( transferMethod is not null && transferMethod . Parameters . Length == 4 )
112112 {
113113 if ( transferMethod . Parameters [ 0 ] . Type != ContractParameterType . Hash160 )
114114 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
@@ -128,12 +128,12 @@ private static System.Collections.Generic.List<CompilationException>
128128 }
129129
130130 // Check Transfer event
131- var transferEvent = manifest . Abi . Events . FirstOrDefault ( e =>
132- e . Name == "Transfer" ) ;
133-
134- if ( transferEvent == null )
131+ var transferEvent = manifest . Abi . Events . FirstOrDefault ( e => e . Name == "Transfer" ) ;
132+ if ( transferEvent is null )
133+ {
135134 errors . Add ( new CompilationException ( DiagnosticId . IncorrectNEPStandard ,
136135 $ "Incomplete NEP standard { NepStandard . Nep17 . ToStandard ( ) } implementation: Transfer event is not found in the ABI") ) ;
136+ }
137137 else
138138 {
139139 if ( transferEvent . Parameters . Length != 3 )
0 commit comments