diff --git a/src/neo/SmartContract/ApplicationEngine.Runtime.cs b/src/neo/SmartContract/ApplicationEngine.Runtime.cs
index 8c9154a543..144239854b 100644
--- a/src/neo/SmartContract/ApplicationEngine.Runtime.cs
+++ b/src/neo/SmartContract/ApplicationEngine.Runtime.cs
@@ -29,6 +29,12 @@ partial class ApplicationEngine
///
public static readonly InteropDescriptor System_Runtime_Platform = Register("System.Runtime.Platform", nameof(GetPlatform), 1 << 3, CallFlags.None);
+ ///
+ /// The of System.Runtime.GetNetwork.
+ /// Gets the magic number of the current network.
+ ///
+ public static readonly InteropDescriptor System_Runtime_GetNetwork = Register("System.Runtime.GetNetwork", nameof(GetNetwork), 1 << 3, CallFlags.None);
+
///
/// The of System.Runtime.GetTrigger.
/// Gets the trigger of the execution.
@@ -117,6 +123,16 @@ internal protected static string GetPlatform()
return "NEO";
}
+ ///
+ /// The implementation of System.Runtime.GetNetwork.
+ /// Gets the magic number of the current network.
+ ///
+ /// The magic number of the current network.
+ internal protected uint GetNetwork()
+ {
+ return ProtocolSettings.Network;
+ }
+
///
/// The implementation of System.Runtime.GetTime.
/// Gets the timestamp of the current block.