Skip to content

Commit

Permalink
replace typeof
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Feb 25, 2024
1 parent 5c8a6cd commit eeca670
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public static string GetArtifactsSource(this ContractManifest manifest, string?

sourceCode.WriteLine(" #region Constructor for internal use only");
sourceCode.WriteLine();
sourceCode.WriteLine($" protected {name}(Neo.SmartContract.Testing.SmartContractInitialize initialize) : base(initialize) {{ }}");
sourceCode.WriteLine($" protected {name}({typeof(SmartContractInitialize).FullName} initialize) : base(initialize) {{ }}");
sourceCode.WriteLine();
sourceCode.WriteLine(" #endregion");

Expand Down Expand Up @@ -243,7 +243,7 @@ private static string CreateSourceEventFromManifest(ContractEventDescriptor ev,
ev.Parameters[2].Type == ContractParameterType.Integer)
{
sourceCode.WriteLine($" [DisplayName(\"{ev.Name}\")]");
sourceCode.WriteLine(" public event Neo.SmartContract.Testing.TestingStandards.INep17Standard.delTransfer? OnTransfer;");
sourceCode.WriteLine($" public event {typeof(INep17Standard).FullName}.delTransfer? OnTransfer;");
return builder.ToString();
}

Expand All @@ -256,7 +256,7 @@ private static string CreateSourceEventFromManifest(ContractEventDescriptor ev,
ev.Parameters[1].Type == ContractParameterType.Hash160)
{
sourceCode.WriteLine($" [DisplayName(\"{ev.Name}\")]");
sourceCode.WriteLine(" public event Neo.SmartContract.Testing.TestingStandards.IOwnable.delSetOwner? OnSetOwner;");
sourceCode.WriteLine($" public event {typeof(IOwnable).FullName}.delSetOwner? OnSetOwner;");
return builder.ToString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public abstract class Contract1 : Neo.SmartContract.Testing.SmartContract, Neo.S
{
#region Compiled data
public static readonly Neo.SmartContract.Manifest.ContractManifest ContractManifest = Neo.SmartContract.Manifest.ContractManifest.Parse(@""{""""name"""":""""Contract1"""",""""groups"""":[],""""features"""":{},""""supportedstandards"""":[""""NEP-17""""],""""abi"""":{""""methods"""":[{""""name"""":""""symbol"""",""""parameters"""":[],""""returntype"""":""""String"""",""""offset"""":1406,""""safe"""":true},{""""name"""":""""decimals"""",""""parameters"""":[],""""returntype"""":""""Integer"""",""""offset"""":1421,""""safe"""":true},{""""name"""":""""totalSupply"""",""""parameters"""":[],""""returntype"""":""""Integer"""",""""offset"""":43,""""safe"""":true},{""""name"""":""""balanceOf"""",""""parameters"""":[{""""name"""":""""owner"""",""""type"""":""""Hash160""""}],""""returntype"""":""""Integer"""",""""offset"""":85,""""safe"""":true},{""""name"""":""""transfer"""",""""parameters"""":[{""""name"""":""""from"""",""""type"""":""""Hash160""""},{""""name"""":""""to"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""},{""""name"""":""""data"""",""""type"""":""""Any""""}],""""returntype"""":""""Boolean"""",""""offset"""":281,""""safe"""":false},{""""name"""":""""getOwner"""",""""parameters"""":[],""""returntype"""":""""Hash160"""",""""offset"""":711,""""safe"""":true},{""""name"""":""""setOwner"""",""""parameters"""":[{""""name"""":""""newOwner"""",""""type"""":""""Hash160""""}],""""returntype"""":""""Void"""",""""offset"""":755,""""safe"""":false},{""""name"""":""""burn"""",""""parameters"""":[{""""name"""":""""account"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""}],""""returntype"""":""""Void"""",""""offset"""":873,""""safe"""":false},{""""name"""":""""mint"""",""""parameters"""":[{""""name"""":""""to"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""}],""""returntype"""":""""Void"""",""""offset"""":915,""""safe"""":false},{""""name"""":""""withdraw"""",""""parameters"""":[{""""name"""":""""token"""",""""type"""":""""Hash160""""},{""""name"""":""""to"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""}],""""returntype"""":""""Boolean"""",""""offset"""":957,""""safe"""":false},{""""name"""":""""onNEP17Payment"""",""""parameters"""":[{""""name"""":""""from"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""},{""""name"""":""""data"""",""""type"""":""""Any""""}],""""returntype"""":""""Void"""",""""offset"""":1139,""""safe"""":false},{""""name"""":""""verify"""",""""parameters"""":[],""""returntype"""":""""Boolean"""",""""offset"""":1203,""""safe"""":true},{""""name"""":""""myMethod"""",""""parameters"""":[],""""returntype"""":""""String"""",""""offset"""":1209,""""safe"""":false},{""""name"""":""""_deploy"""",""""parameters"""":[{""""name"""":""""data"""",""""type"""":""""Any""""},{""""name"""":""""update"""",""""type"""":""""Boolean""""}],""""returntype"""":""""Void"""",""""offset"""":1229,""""safe"""":false},{""""name"""":""""update"""",""""parameters"""":[{""""name"""":""""nefFile"""",""""type"""":""""ByteArray""""},{""""name"""":""""manifest"""",""""type"""":""""String""""}],""""returntype"""":""""Void"""",""""offset"""":1352,""""safe"""":false},{""""name"""":""""_initialize"""",""""parameters"""":[],""""returntype"""":""""Void"""",""""offset"""":1390,""""safe"""":false}],""""events"""":[{""""name"""":""""Transfer"""",""""parameters"""":[{""""name"""":""""from"""",""""type"""":""""Hash160""""},{""""name"""":""""to"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""}]},{""""name"""":""""SetOwner"""",""""parameters"""":[{""""name"""":""""newOwner"""",""""type"""":""""Hash160""""}]}]},""""permissions"""":[{""""contract"""":""""*"""",""""methods"""":""""*""""}],""""trusts"""":[],""""extra"""":{""""Author"""":""""\u003CYour Name Or Company Here\u003E"""",""""Description"""":""""\u003CDescription Here\u003E"""",""""Email"""":""""\u003CYour Public Email Here\u003E"""",""""Version"""":""""\u003CVersion String Here\u003E""""}}"");
public static readonly Neo.SmartContract.Manifest.ContractManifest Manifest = Neo.SmartContract.Manifest.ContractManifest.Parse(@""{""""name"""":""""Contract1"""",""""groups"""":[],""""features"""":{},""""supportedstandards"""":[""""NEP-17""""],""""abi"""":{""""methods"""":[{""""name"""":""""symbol"""",""""parameters"""":[],""""returntype"""":""""String"""",""""offset"""":1406,""""safe"""":true},{""""name"""":""""decimals"""",""""parameters"""":[],""""returntype"""":""""Integer"""",""""offset"""":1421,""""safe"""":true},{""""name"""":""""totalSupply"""",""""parameters"""":[],""""returntype"""":""""Integer"""",""""offset"""":43,""""safe"""":true},{""""name"""":""""balanceOf"""",""""parameters"""":[{""""name"""":""""owner"""",""""type"""":""""Hash160""""}],""""returntype"""":""""Integer"""",""""offset"""":85,""""safe"""":true},{""""name"""":""""transfer"""",""""parameters"""":[{""""name"""":""""from"""",""""type"""":""""Hash160""""},{""""name"""":""""to"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""},{""""name"""":""""data"""",""""type"""":""""Any""""}],""""returntype"""":""""Boolean"""",""""offset"""":281,""""safe"""":false},{""""name"""":""""getOwner"""",""""parameters"""":[],""""returntype"""":""""Hash160"""",""""offset"""":711,""""safe"""":true},{""""name"""":""""setOwner"""",""""parameters"""":[{""""name"""":""""newOwner"""",""""type"""":""""Hash160""""}],""""returntype"""":""""Void"""",""""offset"""":755,""""safe"""":false},{""""name"""":""""burn"""",""""parameters"""":[{""""name"""":""""account"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""}],""""returntype"""":""""Void"""",""""offset"""":873,""""safe"""":false},{""""name"""":""""mint"""",""""parameters"""":[{""""name"""":""""to"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""}],""""returntype"""":""""Void"""",""""offset"""":915,""""safe"""":false},{""""name"""":""""withdraw"""",""""parameters"""":[{""""name"""":""""token"""",""""type"""":""""Hash160""""},{""""name"""":""""to"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""}],""""returntype"""":""""Boolean"""",""""offset"""":957,""""safe"""":false},{""""name"""":""""onNEP17Payment"""",""""parameters"""":[{""""name"""":""""from"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""},{""""name"""":""""data"""",""""type"""":""""Any""""}],""""returntype"""":""""Void"""",""""offset"""":1139,""""safe"""":false},{""""name"""":""""verify"""",""""parameters"""":[],""""returntype"""":""""Boolean"""",""""offset"""":1203,""""safe"""":true},{""""name"""":""""myMethod"""",""""parameters"""":[],""""returntype"""":""""String"""",""""offset"""":1209,""""safe"""":false},{""""name"""":""""_deploy"""",""""parameters"""":[{""""name"""":""""data"""",""""type"""":""""Any""""},{""""name"""":""""update"""",""""type"""":""""Boolean""""}],""""returntype"""":""""Void"""",""""offset"""":1229,""""safe"""":false},{""""name"""":""""update"""",""""parameters"""":[{""""name"""":""""nefFile"""",""""type"""":""""ByteArray""""},{""""name"""":""""manifest"""",""""type"""":""""String""""}],""""returntype"""":""""Void"""",""""offset"""":1352,""""safe"""":false},{""""name"""":""""_initialize"""",""""parameters"""":[],""""returntype"""":""""Void"""",""""offset"""":1390,""""safe"""":false}],""""events"""":[{""""name"""":""""Transfer"""",""""parameters"""":[{""""name"""":""""from"""",""""type"""":""""Hash160""""},{""""name"""":""""to"""",""""type"""":""""Hash160""""},{""""name"""":""""amount"""",""""type"""":""""Integer""""}]},{""""name"""":""""SetOwner"""",""""parameters"""":[{""""name"""":""""newOwner"""",""""type"""":""""Hash160""""}]}]},""""permissions"""":[{""""contract"""":""""*"""",""""methods"""":""""*""""}],""""trusts"""":[],""""extra"""":{""""Author"""":""""\u003CYour Name Or Company Here\u003E"""",""""Description"""":""""\u003CDescription Here\u003E"""",""""Email"""":""""\u003CYour Public Email Here\u003E"""",""""Version"""":""""\u003CVersion String Here\u003E""""}}"");
#endregion
Expand Down

0 comments on commit eeca670

Please sign in to comment.