Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PolicyContract methods #806

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
}