Skip to content

Commit

Permalink
Update PolicyContract methods (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Oct 11, 2023
1 parent 04ccbed commit c8225de
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Neo.Compiler.CSharp/Neo.Compiler.CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageReference Include="Neo" Version="3.6.0-CI01416" />
<PackageReference Include="Neo" Version="3.6.0-CI01421" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta4.22272.1" />
</ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Neo.SmartContract.Framework/Native/Policy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ public class Policy
public static extern uint GetExecFeeFactor();
public static extern uint GetStoragePrice();
public static extern bool IsBlocked(UInt160 account);
public static extern uint GetAttributeFee(TransactionAttributeType attributeType);
public static extern void SetAttributeFee(TransactionAttributeType attributeType, uint value);
}
}
28 changes: 28 additions & 0 deletions src/Neo.SmartContract.Framework/Native/TransactionAttributeType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace Neo.SmartContract.Framework.Native
{
/// <summary>
/// Represents the type of a <see cref="TransactionAttribute"/>.
/// </summary>
public enum TransactionAttributeType : byte
{
/// <summary>
/// Indicates that the transaction is of high priority.
/// </summary>
HighPriority = 0x01,

/// <summary>
/// Indicates that the transaction is an oracle response.
/// </summary>
OracleResponse = 0x11,

/// <summary>
/// Indicates that the transaction is not valid before <see cref="NotValidBefore.Height"/>.
/// </summary>
NotValidBefore = 0x20,

/// <summary>
/// Indicates that the transaction conflicts with <see cref="Conflicts.Hash"/>.
/// </summary>
Conflicts = 0x21
}
}

0 comments on commit c8225de

Please sign in to comment.