-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dd/gh-net-release
- Loading branch information
Showing
41 changed files
with
1,073 additions
and
831 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<AdditionalFiles Include="demo.idl" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Sails.ClientGenerator" /> | ||
<PackageReference Include="Sails.Net" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
type ReferenceCount = struct { | ||
u32, | ||
}; | ||
|
||
type DoThatParam = struct { | ||
p1: nat32, | ||
p2: actor_id, | ||
p3: ManyVariants, | ||
}; | ||
|
||
type ManyVariants = enum { | ||
One, | ||
Two: u32, | ||
Three: opt u256, | ||
Four: struct { a: u32, b: opt u16 }, | ||
Five: struct { str, h256 }, | ||
Six: struct { u32 }, | ||
}; | ||
|
||
type TupleStruct = struct { | ||
bool, | ||
}; | ||
|
||
constructor { | ||
/// Program constructor (called once at the very beginning of the program lifetime) | ||
Default : (); | ||
/// Another program constructor (called once at the very beginning of the program lifetime) | ||
New : (counter: opt u32, dog_position: opt struct { i32, i32 }); | ||
}; | ||
|
||
service Counter { | ||
/// Add a value to the counter | ||
Add : (value: u32) -> u32; | ||
/// Substract a value from the counter | ||
Sub : (value: u32) -> u32; | ||
/// Get the current value | ||
query Value : () -> u32; | ||
|
||
events { | ||
/// Emitted when a new value is added to the counter | ||
Added: u32; | ||
/// Emitted when a value is subtracted from the counter | ||
Subtracted: u32; | ||
} | ||
}; | ||
|
||
service Dog { | ||
MakeSound : () -> str; | ||
Walk : (dx: i32, dy: i32) -> null; | ||
query AvgWeight : () -> u32; | ||
query Position : () -> struct { i32, i32 }; | ||
|
||
events { | ||
Barked; | ||
Walked: struct { from: struct { i32, i32 }, to: struct { i32, i32 } }; | ||
} | ||
}; | ||
|
||
service PingPong { | ||
Ping : (input: str) -> result (str, str); | ||
}; | ||
|
||
service References { | ||
Add : (v: u32) -> u32; | ||
AddByte : (byte: u8) -> vec u8; | ||
GuessNum : (number: u8) -> result (str, str); | ||
Incr : () -> ReferenceCount; | ||
SetNum : (number: u8) -> result (null, str); | ||
query Baked : () -> str; | ||
query LastByte : () -> opt u8; | ||
query Message : () -> opt str; | ||
}; | ||
|
||
service ThisThat { | ||
DoThat : (param: DoThatParam) -> result (struct { actor_id, nat32 }, struct { str }); | ||
DoThis : (p1: u32, p2: str, p3: struct { opt h160, nat8 }, p4: TupleStruct) -> struct { str, u32 }; | ||
Noop : () -> null; | ||
query That : () -> result (str, str); | ||
query This : () -> u32; | ||
}; | ||
|
||
service ValueFee { | ||
/// Return flag if fee taken and remain value, | ||
/// using special type `CommandReply<T>` | ||
DoSomethingAndTakeFee : () -> bool; | ||
|
||
events { | ||
Withheld: u128; | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.