Skip to content

Commit

Permalink
Support for opcodes in bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Relfos committed Jul 3, 2019
1 parent e1a8abe commit c2587e3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion SDK.Builder/SDK.Builder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using System.IO;
using System.Text;
using System.Linq;
using Phantasma.VM;

namespace SDK.Builder
{
Expand Down Expand Up @@ -238,6 +239,7 @@ static void GenerateBindings(string inputPath, string outputPath)

data["methods"] = api.Methods.Select(x => new MethodEntry() { Info = x, ResultFields = x.ReturnType.GetFields() });
data["types"] = typeDic;
data["opcodes"] = Enum.GetValues(typeof(Opcode)).Cast<Opcode>().Select(x => new KeyValuePair<string, byte>(x.ToString(),(byte)x));

foreach (var file in files)
{
Expand Down Expand Up @@ -357,7 +359,6 @@ static void Main(string[] args)

GenerateUnityPackage(inputPath + @"PhantasmaSDK\SDK.Builder\SDK.Builder\bin\Debug", tempPath + @"C#\Libs\");

return;
CopyFolder(inputPath + @"PhantasmaSpook\Spook.CLI\Publish", tempPath + @"Tools\Spook");
CopyFolder(inputPath + @"PhantasmaWallet\PhantasmaWallet\Publish", tempPath + @"Tools\Wallet");
CopyFolder(inputPath + @"PhantasmaExplorer\PhantasmaExplorer\Publish", tempPath + @"Tools\Explorer");
Expand Down
4 changes: 4 additions & 0 deletions SDK.Builder/SDK.Builder/SDK.Builder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
<Project>{194D325F-A2D7-4D8E-ACD2-78387C321FC4}</Project>
<Name>Phantasma.Storage</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\PhantasmaChain\Phantasma.VM\Phantasma.VM.csproj">
<Project>{3E99832E-6EC8-4B87-822E-5F65474BEBF5}</Project>
<Name>Phantasma.VM</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
2 changes: 1 addition & 1 deletion SDK.Builder/SDK.Builder/SDK.Builder.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>-input.path=C:\code -output.path=C:\Code\PhantasmaSDK\Output -output.version=0.2</StartArguments>
<StartArguments>-input.path=C:\code -output.path=C:\Code\PhantasmaSDK\Output -output.version=0.3</StartArguments>
</PropertyGroup>
</Project>

0 comments on commit c2587e3

Please sign in to comment.