@@ -56,7 +56,7 @@ public void Runtime_GetNotifications_Test()
5656 scriptHash2 = script . ToArray ( ) . ToScriptHash ( ) ;
5757
5858 snapshot . DeleteContract ( scriptHash2 ) ;
59- ContractState contract = TestUtils . GetContract ( script . ToArray ( ) , TestUtils . CreateManifest ( "test" , ContractParameterType . Any , ContractParameterType . Integer , ContractParameterType . Integer ) ) ;
59+ var contract = TestUtils . GetContract ( script . ToArray ( ) , TestUtils . CreateManifest ( "test" , ContractParameterType . Any , ContractParameterType . Integer , ContractParameterType . Integer ) ) ;
6060 contract . Manifest . Abi . Events = new [ ]
6161 {
6262 new ContractEventDescriptor
@@ -294,8 +294,8 @@ public void TestRuntime_CheckWitness()
294294 {
295295 byte [ ] privateKey = { 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
296296 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 } ;
297- KeyPair keyPair = new ( privateKey ) ;
298- ECPoint pubkey = keyPair . PublicKey ;
297+ var keyPair = new KeyPair ( privateKey ) ;
298+ var pubkey = keyPair . PublicKey ;
299299
300300 var engine = GetEngine ( true ) ;
301301 ( ( Transaction ) engine . ScriptContainer ) . Signers [ 0 ] . Account = Contract . CreateSignatureRedeemScript ( pubkey ) . ToScriptHash ( ) ;
@@ -316,8 +316,8 @@ public void TestRuntime_CheckWitness_Null_ScriptContainer()
316316 {
317317 byte [ ] privateKey = { 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
318318 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 } ;
319- KeyPair keyPair = new ( privateKey ) ;
320- ECPoint pubkey = keyPair . PublicKey ;
319+ var keyPair = new KeyPair ( privateKey ) ;
320+ var pubkey = keyPair . PublicKey ;
321321
322322 var engine = GetEngine ( ) ;
323323
@@ -328,7 +328,7 @@ public void TestRuntime_CheckWitness_Null_ScriptContainer()
328328 public void TestRuntime_Log ( )
329329 {
330330 var engine = GetEngine ( true ) ;
331- string message = "hello" ;
331+ var message = "hello" ;
332332 ApplicationEngine . Log += LogEvent ;
333333 engine . RuntimeLog ( Encoding . UTF8 . GetBytes ( message ) ) ;
334334 ( ( Transaction ) engine . ScriptContainer ) . Script . Span . ToHexString ( ) . Should ( ) . Be ( new byte [ ] { 0x01 , 0x02 , 0x03 } . ToHexString ( ) ) ;
@@ -396,16 +396,16 @@ public void TestRuntime_GetCurrentSigners_SysCall()
396396 public void TestCrypto_Verify ( )
397397 {
398398 var engine = GetEngine ( true ) ;
399- IVerifiable iv = engine . ScriptContainer ;
400- byte [ ] message = iv . GetSignData ( TestProtocolSettings . Default . Network ) ;
399+ var iv = engine . ScriptContainer ;
400+ var message = iv . GetSignData ( TestProtocolSettings . Default . Network ) ;
401401 byte [ ] privateKey = { 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
402402 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 } ;
403403 KeyPair keyPair = new ( privateKey ) ;
404- ECPoint pubkey = keyPair . PublicKey ;
405- byte [ ] signature = Crypto . Sign ( message , privateKey , pubkey . EncodePoint ( false ) . Skip ( 1 ) . ToArray ( ) ) ;
404+ var pubkey = keyPair . PublicKey ;
405+ var signature = Crypto . Sign ( message , privateKey , pubkey . EncodePoint ( false ) . Skip ( 1 ) . ToArray ( ) ) ;
406406 engine . CheckSig ( pubkey . EncodePoint ( false ) , signature ) . Should ( ) . BeTrue ( ) ;
407407
408- byte [ ] wrongkey = pubkey . EncodePoint ( false ) ;
408+ var wrongkey = pubkey . EncodePoint ( false ) ;
409409 wrongkey [ 0 ] = 5 ;
410410 Assert . ThrowsException < FormatException > ( ( ) => engine . CheckSig ( wrongkey , signature ) ) ;
411411 }
@@ -424,7 +424,7 @@ public void TestBlockchain_GetBlock()
424424
425425 NativeContract . Ledger . GetBlock ( engine . Snapshot , UInt256 . Zero ) . Should ( ) . BeNull ( ) ;
426426
427- byte [ ] data1 = new byte [ ] { 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
427+ var data1 = new byte [ ] { 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
428428 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
429429 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
430430 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 } ;
@@ -436,7 +436,7 @@ public void TestBlockchain_GetBlock()
436436 public void TestBlockchain_GetTransaction ( )
437437 {
438438 var engine = GetEngine ( true , true ) ;
439- byte [ ] data1 = new byte [ ] { 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
439+ var data1 = new byte [ ] { 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
440440 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
441441 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
442442 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 } ;
@@ -469,7 +469,7 @@ public void TestBlockchain_GetTransactionHeight()
469469 public void TestBlockchain_GetContract ( )
470470 {
471471 var engine = GetEngine ( true , true ) ;
472- byte [ ] data1 = new byte [ ] { 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
472+ var data1 = new byte [ ] { 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
473473 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
474474 0x01 , 0x01 , 0x01 , 0x01 , 0x01 ,
475475 0x01 , 0x01 , 0x01 , 0x01 , 0x01 } ;
@@ -638,7 +638,7 @@ public void TestStorageContext_AsReadOnly()
638638 public void TestContract_Call ( )
639639 {
640640 var snapshot = TestBlockchain . GetTestSnapshot ( ) ;
641- string method = "method" ;
641+ var method = "method" ;
642642 var args = new VM . Types . Array { 0 , 1 } ;
643643 var state = TestUtils . GetContract ( method , args . Count ) ;
644644
@@ -696,13 +696,13 @@ public void TestContract_Destroy()
696696 [ TestMethod ]
697697 public void TestContract_CreateStandardAccount ( )
698698 {
699- ECPoint pubkey = ECPoint . Parse ( "024b817ef37f2fc3d4a33fe36687e592d9f30fe24b3e28187dc8f12b3b3b2b839e" , ECCurve . Secp256r1 ) ;
699+ var pubkey = ECPoint . Parse ( "024b817ef37f2fc3d4a33fe36687e592d9f30fe24b3e28187dc8f12b3b3b2b839e" , ECCurve . Secp256r1 ) ;
700700 GetEngine ( ) . CreateStandardAccount ( pubkey ) . ToArray ( ) . ToHexString ( ) . Should ( ) . Be ( "c44ea575c5f79638f0e73f39d7bd4b3337c81691" ) ;
701701 }
702702
703703 public static void LogEvent ( object sender , LogEventArgs args )
704704 {
705- Transaction tx = ( Transaction ) args . ScriptContainer ;
705+ var tx = ( Transaction ) args . ScriptContainer ;
706706 tx . Script = new byte [ ] { 0x01 , 0x02 , 0x03 } ;
707707 }
708708
@@ -711,7 +711,7 @@ private static ApplicationEngine GetEngine(bool hasContainer = false, bool hasSn
711711 var tx = hasContainer ? TestUtils . GetTransaction ( UInt160 . Zero ) : null ;
712712 var snapshot = hasSnapshot ? TestBlockchain . GetTestSnapshot ( ) : null ;
713713 var block = hasBlock ? new Block { Header = new Header ( ) } : null ;
714- ApplicationEngine engine = ApplicationEngine . Create ( TriggerType . Application , tx , snapshot , block , TestBlockchain . TheNeoSystem . Settings , gas : gas ) ;
714+ var engine = ApplicationEngine . Create ( TriggerType . Application , tx , snapshot , block , TestBlockchain . TheNeoSystem . Settings , gas : gas ) ;
715715 if ( addScript ) engine . LoadScript ( new byte [ ] { 0x01 } ) ;
716716 return engine ;
717717 }
0 commit comments