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

[Framework Add] implement payable #990

Merged
merged 16 commits into from
Jun 5, 2024
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
49 changes: 49 additions & 0 deletions src/Neo.Compiler.CSharp/ContractManifestExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,45 @@ private static void CheckNep17Compliant(this ContractManifest manifest)
}
}

private static void CheckNep11PayableCompliant(this ContractManifest manifest)
{
try
{
var onNEP11PaymentMethod = manifest.Abi.GetMethod("onNEP11Payment", 4);
var onNEP11PaymentValid = onNEP11PaymentMethod is { ReturnType: ContractParameterType.Void } &&
onNEP11PaymentMethod.Parameters[0].Type == ContractParameterType.Hash160 &&
onNEP11PaymentMethod.Parameters[1].Type == ContractParameterType.Integer &&
onNEP11PaymentMethod.Parameters[2].Type == ContractParameterType.String &&
onNEP11PaymentMethod.Parameters[3].Type == ContractParameterType.Any;

if (!onNEP11PaymentValid) throw new CompilationException(DiagnosticId.IncorrectNEPStandard,
$"Incomplete NEP standard {NepStandard.Nep11Payable.ToStandard()} implementation: onNEP11Payment");
}
catch (Exception ex) when (ex is not CompilationException)
{
throw new CompilationException(DiagnosticId.IncorrectNEPStandard, $"Incomplete NEP standard {NepStandard.Nep11Payable.ToStandard()} implementation: Unidentified issue.");
}
}

private static void CheckNep17PayableCompliant(this ContractManifest manifest)
shargon marked this conversation as resolved.
Show resolved Hide resolved
{
try
{
var onNEP17PaymentMethod = manifest.Abi.GetMethod("onNEP17Payment", 3);
var onNEP17PaymentValid = onNEP17PaymentMethod is { ReturnType: ContractParameterType.Void } &&
onNEP17PaymentMethod.Parameters[0].Type == ContractParameterType.Hash160 &&
onNEP17PaymentMethod.Parameters[1].Type == ContractParameterType.Integer &&
onNEP17PaymentMethod.Parameters[2].Type == ContractParameterType.Any;

if (!onNEP17PaymentValid) throw new CompilationException(DiagnosticId.IncorrectNEPStandard,
$"Incomplete NEP standard {NepStandard.Nep17Payable.ToStandard()} implementation: onNEP17Payment");
}
catch (Exception ex) when (ex is not CompilationException)
{
throw new CompilationException(DiagnosticId.IncorrectNEPStandard, $"Incomplete NEP standard {NepStandard.Nep17Payable.ToStandard()} implementation: Unidentified issue.");
}
}

internal static ContractManifest CheckStandards(this ContractManifest manifest)
{
if (manifest.SupportedStandards.Contains(NepStandard.Nep11.ToStandard()))
Expand All @@ -175,6 +214,16 @@ internal static ContractManifest CheckStandards(this ContractManifest manifest)
manifest.CheckNep17Compliant();
}

if (manifest.SupportedStandards.Contains(NepStandard.Nep11Payable.ToStandard()))
{
manifest.CheckNep11PayableCompliant();
}

if (manifest.SupportedStandards.Contains(NepStandard.Nep17Payable.ToStandard()))
{
manifest.CheckNep17PayableCompliant();
}

return manifest;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/Neo.SmartContract.Framework/Interfaces/INEP11Payable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public interface INep11Payable
/// </summary>
/// <param name="from">The address of the payer</param>
/// <param name="amount">The amount of token to be transferred</param>
/// <param name="tokenId">The token id to be transferred</param>
/// <param name="data">Additional payment description data</param>
/// <remarks>
/// This interface method is defined as non-static,
Expand All @@ -34,5 +35,5 @@ public interface INep11Payable
/// Both static and non-static methods of smart contract interface works,
/// they differs on how you process static field.
/// </remarks>
public void OnNEP11Payment(UInt160 from, BigInteger amount, object? data = null);
public void OnNEP11Payment(UInt160 from, BigInteger amount, string tokenId, object? data = null);
}
14 changes: 14 additions & 0 deletions src/Neo.SmartContract.Framework/NEPStandard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ public enum NepStandard
// The NEP-17 standard is used for fungible tokens.
// Defined at https://github.com/neo-project/proposals/blob/master/nep-17.mediawiki
Nep17,
// Smart contract transfer callback for non-fungible tokens (NFTs).
// This is an extension standard of NEP-11.
// Defined at https://github.com/neo-project/proposals/pull/169/files#diff-2b5f7c12a23f7dbe4cb46bbf4be6936882f8e0f0b3a4db9d8c58eb294b02e6ed
Nep26,
// This is the nick name of NEP-25.
Nep11Payable,
// Smart contract transfer callback for fungible tokens.
// This is an extension standard of NEP-17.
// Defined at https://github.com/neo-project/proposals/pull/169/files#diff-70768f307c9aa84f8c94e790495a76d47fffeca2331444592ebba6f13b1e6460
Nep27,
// This is the nick name of NEP-26.
Nep17Payable,
// This NEP defines a global standard to get royalty payment information for Non-Fungible Tokens (NFTs)
// in order to enable support for royalty payments across all NFT marketplaces in the NEO Smart Economy.
// This NEP requires NEP-11.
Expand All @@ -35,6 +47,8 @@ public static string ToStandard(this NepStandard standard)
NepStandard.Nep11 => "NEP-11",
NepStandard.Nep17 => "NEP-17",
NepStandard.Nep24 => "NEP-24",
NepStandard.Nep11Payable or NepStandard.Nep26 => "NEP-26",
NepStandard.Nep17Payable or NepStandard.Nep27 => "NEP-27",
_ => standard.ToString()
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static bool TestStandard()

public override string Symbol { [Safe] get; } = "EXAMPLE";

public void OnNEP11Payment(UInt160 from, BigInteger amount, object? data = null)
public void OnNEP11Payment(UInt160 from, BigInteger amount, string tokenId, object? data = null)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Neo.SmartContract.Framework.Attributes;
using System.ComponentModel;
using System.Numerics;
using Neo.SmartContract.Framework.Interfaces;

namespace Neo.SmartContract.Framework.TestContracts
{
[DisplayName(nameof(Contract_SupportedStandard11Payable))]
[ContractDescription("<Description Here>")]
[ContractAuthor("<Your Name Or Company Here>", "<Your Public Email Here>")]
[ContractVersion("<Version String Here>")]
[ContractPermission(Permission.Any, Method.Any)]
[SupportedStandards(NepStandard.Nep11Payable)]
public class Contract_SupportedStandard11Payable : SmartContract, INep11Payable
{
public void OnNEP11Payment(UInt160 from, BigInteger amount, string tokenId, object? data = null)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Neo.SmartContract.Framework.Attributes;
using System.ComponentModel;
using System.Numerics;
using Neo.SmartContract.Framework.Interfaces;

namespace Neo.SmartContract.Framework.TestContracts
{
[DisplayName(nameof(Contract_SupportedStandard17Payable))]
[ContractDescription("<Description Here>")]
[ContractAuthor("<Your Name Or Company Here>", "<Your Public Email Here>")]
[ContractVersion("<Version String Here>")]
[ContractPermission(Permission.Any, Method.Any)]
[SupportedStandards(NepStandard.Nep17Payable)]
public class Contract_SupportedStandard17Payable : SmartContract, INep17Payable
{
public void OnNEP17Payment(UInt160 from, BigInteger amount, object? data = null)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,17 @@ public void TestStandardNEP17AttributeEnum()
{
CollectionAssert.AreEqual(Contract_SupportedStandard17Enum.Manifest.SupportedStandards, new string[] { "NEP-17" });
}

[TestMethod]
public void TestStandardNEP11PayableAttribute()
{
CollectionAssert.AreEqual(Contract_SupportedStandard11Payable.Manifest.SupportedStandards, new string[] { "NEP-26" });
}

[TestMethod]
public void TestStandardNEP17PayableAttribute()
{
CollectionAssert.AreEqual(Contract_SupportedStandard17Payable.Manifest.SupportedStandards, new string[] { "NEP-27" });
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ public abstract class Contract_SupportedStandard11Enum : Neo.SmartContract.Testi
{
#region Compiled data

public static readonly Neo.SmartContract.Manifest.ContractManifest Manifest = Neo.SmartContract.Manifest.ContractManifest.Parse(@"{""name"":""Contract_SupportedStandard11Enum"",""groups"":[],""features"":{},""supportedstandards"":[""NEP-11""],""abi"":{""methods"":[{""name"":""symbol"",""parameters"":[],""returntype"":""String"",""offset"":953,""safe"":true},{""name"":""decimals"",""parameters"":[],""returntype"":""Integer"",""offset"":970,""safe"":true},{""name"":""totalSupply"",""parameters"":[],""returntype"":""Integer"",""offset"":45,""safe"":true},{""name"":""balanceOf"",""parameters"":[{""name"":""owner"",""type"":""Hash160""}],""returntype"":""Integer"",""offset"":71,""safe"":true},{""name"":""ownerOf"",""parameters"":[{""name"":""tokenId"",""type"":""ByteArray""}],""returntype"":""Hash160"",""offset"":267,""safe"":true},{""name"":""properties"",""parameters"":[{""name"":""tokenId"",""type"":""ByteArray""}],""returntype"":""Map"",""offset"":985,""safe"":true},{""name"":""tokens"",""parameters"":[],""returntype"":""InteropInterface"",""offset"":472,""safe"":true},{""name"":""tokensOf"",""parameters"":[{""name"":""owner"",""type"":""Hash160""}],""returntype"":""InteropInterface"",""offset"":502,""safe"":true},{""name"":""transfer"",""parameters"":[{""name"":""to"",""type"":""Hash160""},{""name"":""tokenId"",""type"":""ByteArray""},{""name"":""data"",""type"":""Any""}],""returntype"":""Boolean"",""offset"":595,""safe"":false},{""name"":""testStandard"",""parameters"":[],""returntype"":""Boolean"",""offset"":908,""safe"":false},{""name"":""onNEP11Payment"",""parameters"":[{""name"":""from"",""type"":""Hash160""},{""name"":""amount"",""type"":""Integer""},{""name"":""data"",""type"":""Any""}],""returntype"":""Void"",""offset"":1000,""safe"":false},{""name"":""_initialize"",""parameters"":[],""returntype"":""Void"",""offset"":918,""safe"":false}],""events"":[{""name"":""Transfer"",""parameters"":[{""name"":""from"",""type"":""Hash160""},{""name"":""to"",""type"":""Hash160""},{""name"":""amount"",""type"":""Integer""},{""name"":""tokenId"",""type"":""ByteArray""}]}]},""permissions"":[{""contract"":""0x726cb6e0cd8628a1350a611384688911ab75f51b"",""methods"":[""sha256""]},{""contract"":""0xacce6fd80d44e1796aa0c2c625e9e4e0ce39efc0"",""methods"":[""deserialize"",""serialize""]},{""contract"":""0xfffdc93764dbaddd97c48f252a53ea4643faa3fd"",""methods"":[""getContract""]},{""contract"":""*"",""methods"":[""onNEP11Payment""]}],""trusts"":[],""extra"":{}}");
public static readonly Neo.SmartContract.Manifest.ContractManifest Manifest = Neo.SmartContract.Manifest.ContractManifest.Parse(@"{""name"":""Contract_SupportedStandard11Enum"",""groups"":[],""features"":{},""supportedstandards"":[""NEP-11""],""abi"":{""methods"":[{""name"":""symbol"",""parameters"":[],""returntype"":""String"",""offset"":953,""safe"":true},{""name"":""decimals"",""parameters"":[],""returntype"":""Integer"",""offset"":970,""safe"":true},{""name"":""totalSupply"",""parameters"":[],""returntype"":""Integer"",""offset"":45,""safe"":true},{""name"":""balanceOf"",""parameters"":[{""name"":""owner"",""type"":""Hash160""}],""returntype"":""Integer"",""offset"":71,""safe"":true},{""name"":""ownerOf"",""parameters"":[{""name"":""tokenId"",""type"":""ByteArray""}],""returntype"":""Hash160"",""offset"":267,""safe"":true},{""name"":""properties"",""parameters"":[{""name"":""tokenId"",""type"":""ByteArray""}],""returntype"":""Map"",""offset"":985,""safe"":true},{""name"":""tokens"",""parameters"":[],""returntype"":""InteropInterface"",""offset"":472,""safe"":true},{""name"":""tokensOf"",""parameters"":[{""name"":""owner"",""type"":""Hash160""}],""returntype"":""InteropInterface"",""offset"":502,""safe"":true},{""name"":""transfer"",""parameters"":[{""name"":""to"",""type"":""Hash160""},{""name"":""tokenId"",""type"":""ByteArray""},{""name"":""data"",""type"":""Any""}],""returntype"":""Boolean"",""offset"":595,""safe"":false},{""name"":""testStandard"",""parameters"":[],""returntype"":""Boolean"",""offset"":908,""safe"":false},{""name"":""onNEP11Payment"",""parameters"":[{""name"":""from"",""type"":""Hash160""},{""name"":""amount"",""type"":""Integer""},{""name"":""tokenId"",""type"":""String""},{""name"":""data"",""type"":""Any""}],""returntype"":""Void"",""offset"":1000,""safe"":false},{""name"":""_initialize"",""parameters"":[],""returntype"":""Void"",""offset"":918,""safe"":false}],""events"":[{""name"":""Transfer"",""parameters"":[{""name"":""from"",""type"":""Hash160""},{""name"":""to"",""type"":""Hash160""},{""name"":""amount"",""type"":""Integer""},{""name"":""tokenId"",""type"":""ByteArray""}]}]},""permissions"":[{""contract"":""0x726cb6e0cd8628a1350a611384688911ab75f51b"",""methods"":[""sha256""]},{""contract"":""0xacce6fd80d44e1796aa0c2c625e9e4e0ce39efc0"",""methods"":[""deserialize"",""serialize""]},{""contract"":""0xfffdc93764dbaddd97c48f252a53ea4643faa3fd"",""methods"":[""getContract""]},{""contract"":""*"",""methods"":[""onNEP11Payment""]}],""trusts"":[],""extra"":{}}");

public static readonly Neo.SmartContract.NefFile Nef = Neo.IO.Helper.AsSerializable<Neo.SmartContract.NefFile>(Convert.FromBase64String(@"TkVGM1Rlc3RpbmdFbmdpbmUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATA7znO4OTpJcbCoGp54UQN2G/OrAtkZXNlcmlhbGl6ZQEAAQ/A7znO4OTpJcbCoGp54UQN2G/OrAlzZXJpYWxpemUBAAEP/aP6Q0bqUyolj8SX3a3bZDfJ/f8LZ2V0Q29udHJhY3QBAAEPG/V1qxGJaIQTYQo1oSiGzeC2bHIGc2hhMjU2AQABDwAA/fYDEM5AVwABeBAMB0VYQU1QTEXQeDQDQFcAAXg0A0BXAAF4NANAVwABQFcAARBAWtgmFwwBAEH2tGviQZJd6DFK2CYERRBKYkBXAQF4cGgLlyYHEdsgIg14StkoUMoAFLOrqiYlDCBUaGUgYXJndW1lbnQgIm93bmVyIiBpcyBpbnZhbGlkLjpBm/ZnzhERiE4QUdBQEsBweGjBRVOLUEGSXegxStgmBEUQ2yEiAkBXAgJBm/ZnzhERiE4QUdBQEsBweGjBRVOLUEGSXegxStgmBEUQ2yFxaXmeSnFFaRC1JgcQ2yAiJ2kQsyYQeGjBRVOLUEEvWMXtIg9peGjBRVOLUEHmPxiEEdsgIgJAVwMBeMoAQLcmPAw3VGhlIGFyZ3VtZW50ICJ0b2tlbklkIiBzaG91bGQgYmUgNjQgb3IgbGVzcyBieXRlcyBsb25nLjoTEYhOEFHQQZv2Z84SwHB4aMFFU4tQQZJd6DFK2CY0RQwuVGhlIHRva2VuIHdpdGggZ2l2ZW4gInRva2VuSWQiIGRvZXMgbm90IGV4aXN0LjpxaTcAAHJqEM4iAkBXAgITEYhOEFHQQZv2Z84SwHB5aMFFU4tQQZJd6DE3AABxyGkRzktT0CICQFcBABMRiE4QUdBBm/ZnzhLAcBNowUVB3zC4miICQFcBAXhwaAuXJgcR2yAiDXhK2ShQygAUs6uqJiQMH1RoZSBhcmd1bWVudCAib3duZXIiIGlzIGludmFsaWQ6FBGIThBR0EGb9mfOEsBwE3howUVTi1BB3zC4miICQFcDA3hwaAuXJgcR2yAiDXhK2ShQygAUs6uqJiIMHVRoZSBhcmd1bWVudCAidG8iIGlzIGludmFsaWQuOhMRiE4QUdBBm/ZnzhLAcHlowUVTi1BBkl3oMTcAAHFpEM5yakH4J+yMqiYHENsgIjVqeJgmJXhKaRBR0EVpNwEASnlowUVTi1BB5j8YhEUPeWo0ExF5eDQOenl4ajRKEdsgIgJAVwIDeng1tP3//0VBm/ZnzhQRiE4QUdBQEsBweHmL2yhxehC3JhEQaWjBRVOLUEHmPxiEIg5paMFFU4tQQS9Yxe1AVwEEwkp4z0p5z0oRz0p6zwwIVHJhbnNmZXJBlQFvYXlwaAuXqiQHENsgIgt5NwIAcGgLl6omIHt6EXgUwB8MDm9uTkVQMTFQYXltZW50eUFifVtSRUAR2yAiAkBXAARAVgMKFP7//wqL/P//Cl78//8TwGAKAv7//wp5/P//CxPAYUALEcBKWM9KNUP8//8jO/z//8JKWc9KNUf8//8jVPz//8JKWc9KNTj8//8jyf3//wsRwEpYz0o1FPz//yKeK4TEhA=="));
public static readonly Neo.SmartContract.NefFile Nef = Neo.IO.Helper.AsSerializable<Neo.SmartContract.NefFile>(Convert.FromBase64String(@"TkVGM1Rlc3RpbmdFbmdpbmUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATA7znO4OTpJcbCoGp54UQN2G/OrAtkZXNlcmlhbGl6ZQEAAQ/A7znO4OTpJcbCoGp54UQN2G/OrAlzZXJpYWxpemUBAAEP/aP6Q0bqUyolj8SX3a3bZDfJ/f8LZ2V0Q29udHJhY3QBAAEPG/V1qxGJaIQTYQo1oSiGzeC2bHIGc2hhMjU2AQABDwAA/fYDEM5AVwABeBAMB0VYQU1QTEXQeDQDQFcAAXg0A0BXAAF4NANAVwABQFcAARBAWtgmFwwBAEH2tGviQZJd6DFK2CYERRBKYkBXAQF4cGgLlyYHEdsgIg14StkoUMoAFLOrqiYlDCBUaGUgYXJndW1lbnQgIm93bmVyIiBpcyBpbnZhbGlkLjpBm/ZnzhERiE4QUdBQEsBweGjBRVOLUEGSXegxStgmBEUQ2yEiAkBXAgJBm/ZnzhERiE4QUdBQEsBweGjBRVOLUEGSXegxStgmBEUQ2yFxaXmeSnFFaRC1JgcQ2yAiJ2kQsyYQeGjBRVOLUEEvWMXtIg9peGjBRVOLUEHmPxiEEdsgIgJAVwMBeMoAQLcmPAw3VGhlIGFyZ3VtZW50ICJ0b2tlbklkIiBzaG91bGQgYmUgNjQgb3IgbGVzcyBieXRlcyBsb25nLjoTEYhOEFHQQZv2Z84SwHB4aMFFU4tQQZJd6DFK2CY0RQwuVGhlIHRva2VuIHdpdGggZ2l2ZW4gInRva2VuSWQiIGRvZXMgbm90IGV4aXN0LjpxaTcAAHJqEM4iAkBXAgITEYhOEFHQQZv2Z84SwHB5aMFFU4tQQZJd6DE3AABxyGkRzktT0CICQFcBABMRiE4QUdBBm/ZnzhLAcBNowUVB3zC4miICQFcBAXhwaAuXJgcR2yAiDXhK2ShQygAUs6uqJiQMH1RoZSBhcmd1bWVudCAib3duZXIiIGlzIGludmFsaWQ6FBGIThBR0EGb9mfOEsBwE3howUVTi1BB3zC4miICQFcDA3hwaAuXJgcR2yAiDXhK2ShQygAUs6uqJiIMHVRoZSBhcmd1bWVudCAidG8iIGlzIGludmFsaWQuOhMRiE4QUdBBm/ZnzhLAcHlowUVTi1BBkl3oMTcAAHFpEM5yakH4J+yMqiYHENsgIjVqeJgmJXhKaRBR0EVpNwEASnlowUVTi1BB5j8YhEUPeWo0ExF5eDQOenl4ajRKEdsgIgJAVwIDeng1tP3//0VBm/ZnzhQRiE4QUdBQEsBweHmL2yhxehC3JhEQaWjBRVOLUEHmPxiEIg5paMFFU4tQQS9Yxe1AVwEEwkp4z0p5z0oRz0p6zwwIVHJhbnNmZXJBlQFvYXlwaAuXqiQHENsgIgt5NwIAcGgLl6omIHt6EXgUwB8MDm9uTkVQMTFQYXltZW50eUFifVtSRUAR2yAiAkBXAAVAVgMKFP7//wqL/P//Cl78//8TwGAKAv7//wp5/P//CxPAYUALEcBKWM9KNUP8//8jO/z//8JKWc9KNUf8//8jVPz//8JKWc9KNTj8//8jyf3//wsRwEpYz0o1FPz//yKevncGMg=="));

#endregion

Expand Down Expand Up @@ -83,7 +83,7 @@ public abstract class Contract_SupportedStandard11Enum : Neo.SmartContract.Testi
/// Unsafe method
/// </summary>
[DisplayName("onNEP11Payment")]
public abstract void OnNEP11Payment(UInt160? from, BigInteger? amount, object? data = null);
public abstract void OnNEP11Payment(UInt160? from, BigInteger? amount, string? tokenId, object? data = null);

/// <summary>
/// Unsafe method
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Neo.Cryptography.ECC;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Numerics;

namespace Neo.SmartContract.Testing;

public abstract class Contract_SupportedStandard11Payable : Neo.SmartContract.Testing.SmartContract
{
#region Compiled data

public static readonly Neo.SmartContract.Manifest.ContractManifest Manifest = Neo.SmartContract.Manifest.ContractManifest.Parse(@"{""name"":""Contract_SupportedStandard11Payable"",""groups"":[],""features"":{},""supportedstandards"":[""NEP-26""],""abi"":{""methods"":[{""name"":""onNEP11Payment"",""parameters"":[{""name"":""from"",""type"":""Hash160""},{""name"":""amount"",""type"":""Integer""},{""name"":""tokenId"",""type"":""String""},{""name"":""data"",""type"":""Any""}],""returntype"":""Void"",""offset"":15,""safe"":false}],""events"":[]},""permissions"":[{""contract"":""*"",""methods"":""*""}],""trusts"":[],""extra"":{""Description"":""\u003CDescription Here\u003E"",""Author"":""\u003CYour Name Or Company Here\u003E"",""Version"":""\u003CVersion String Here\u003E""}}");

public static readonly Neo.SmartContract.NefFile Nef = Neo.IO.Helper.AsSerializable<Neo.SmartContract.NefFile>(Convert.FromBase64String(@"TkVGM1Rlc3RpbmdFbmdpbmUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVXAAVAVwABeDQDQFcAAUDCSjTzIu1tevRy"));

#endregion

#region Unsafe methods

/// <summary>
/// Unsafe method
/// </summary>
[DisplayName("onNEP11Payment")]
public abstract void OnNEP11Payment(UInt160? from, BigInteger? amount, string? tokenId, object? data = null);

#endregion

#region Constructor for internal use only

protected Contract_SupportedStandard11Payable(Neo.SmartContract.Testing.SmartContractInitialize initialize) : base(initialize) { }

#endregion
}
Loading
Loading