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

Feature manifest and permission system #766

Merged
merged 66 commits into from
May 24, 2019
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
9e101ab
Classes
shargon May 20, 2019
0ab7368
Check Valid group signature
shargon May 20, 2019
f548702
Is Allowed
shargon May 20, 2019
143297b
Reuse some classes
shargon May 20, 2019
dfed28b
Fix IsAllowed
shargon May 20, 2019
5ce76cc
Trusts and SafeMethods
shargon May 20, 2019
6b26077
Process trust and Group
shargon May 20, 2019
8781770
Clean code
shargon May 20, 2019
a1c6f72
Add comments
shargon May 20, 2019
5b1aaec
Add more comments
shargon May 20, 2019
34aa3ba
WillCardContainer
shargon May 21, 2019
ed75324
Group as Array
shargon May 21, 2019
f7f36e8
Willcard in ContractPermission
shargon May 21, 2019
2058fd0
Fix trusts
shargon May 21, 2019
deb3707
Clean code
shargon May 21, 2019
6d1d627
Merge branch 'master' into feature-manifest
shargon May 21, 2019
44f5ce0
Merge branch 'master' into feature-manifest
shargon May 21, 2019
1f8b316
Typo fix
shargon May 21, 2019
0137897
Integrate ContractManifest
shargon May 21, 2019
7736247
Integrate in Contract.Call
shargon May 21, 2019
3a5b0ba
Clone Manifest
shargon May 21, 2019
453675c
full manifest in json
shargon May 21, 2019
55fd385
Default value in constructor
shargon May 21, 2019
cd306e8
Serialize ContractManifest
shargon May 21, 2019
2b40a8d
Default Abi for Native Contract
shargon May 21, 2019
6b36687
Fix return for PolicyContract
shargon May 21, 2019
c402d0b
Nep5Token Abi
shargon May 21, 2019
f33b0e8
Clean code
shargon May 21, 2019
ce0aa85
Abi for GastToken
shargon May 21, 2019
89051bf
Abi for NeoToken
shargon May 21, 2019
93d6ae8
Default entry point in the static method
shargon May 21, 2019
768df1f
MaxLength for ContractManifest
shargon May 21, 2019
0729674
Migrate too
shargon May 21, 2019
7842694
Merge branch 'master' into feature-manifest
shargon May 22, 2019
524a745
Parsing json
shargon May 22, 2019
548acf0
Merge remote-tracking branch 'shargon/feature-manifest' into feature-…
shargon May 22, 2019
16d1ff5
Unit test for json
shargon May 22, 2019
c09a795
Validate ContractManifest
shargon May 22, 2019
47b3efc
Neo.Contract.UpdateManifest
shargon May 22, 2019
1cb3650
Deserialize
shargon May 22, 2019
2b9c5dc
Check hash of the manifest in update
shargon May 22, 2019
c18cd5b
Rename classes
shargon May 22, 2019
31feebc
Erik recommendations
shargon May 23, 2019
3f0772b
Move default entry point
shargon May 23, 2019
ecb338f
Revert Helper.cs
erikzhang May 23, 2019
f94021b
fix tests
erikzhang May 23, 2019
1d4e281
Change the type of `ContractManifestGroup.PubKey` to `ECPoint`
erikzhang May 23, 2019
6bc60f1
Move classes to namespace `Neo.SmartContract.Manifest`, and rename
erikzhang May 23, 2019
8d38246
Remove `Equals()`
erikzhang May 23, 2019
93cd013
Fix `DefaultEntryPoint`
erikzhang May 23, 2019
4dacb2c
Fix `ToJson()` and `ContractManifest.CreateDefault()`
erikzhang May 23, 2019
5400351
Add `ContractManifest.DeserializeFromJson()`
erikzhang May 23, 2019
cc4a340
optimize
erikzhang May 23, 2019
dab02a5
Groups never be null
shargon May 23, 2019
38fc8d7
Not allowed to be set to null
erikzhang May 23, 2019
26ff492
Combine `Neo.Contract.Migrate` and `Neo.Contract.UpdateManifest`
erikzhang May 23, 2019
d00903e
Ensure `contract.Manifest.Hash == contract.ScriptHash` in `Contract_C…
erikzhang May 23, 2019
12a1576
rename
erikzhang May 23, 2019
162758e
Fix `Contract_Call`
erikzhang May 23, 2019
2cdb847
Implement `ContractPermission` correctly
erikzhang May 23, 2019
84c38f9
Simplify `IsValid()`
erikzhang May 23, 2019
fcdab61
Update ContractGroup.cs
shargon May 23, 2019
7c7a82d
Change max length of ContractManifest
shargon May 23, 2019
efac87f
Add `events` for ABI of `Nep5Token`
erikzhang May 23, 2019
a3a1b0d
format
erikzhang May 23, 2019
b44ec29
Update WildCardContainer.cs
erikzhang May 23, 2019
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
Prev Previous commit
Next Next commit
Fix return for PolicyContract
shargon committed May 21, 2019

Verified

This commit was signed with the committer’s verified signature.
wezm Wesley Moore
commit 6b36687fdab245721d43d3f83e77ad658f16f6a9
1 change: 0 additions & 1 deletion neo/SmartContract/Native/NativeContract.cs
Original file line number Diff line number Diff line change
@@ -36,7 +36,6 @@ protected NativeContract()

this.Hash = Script.ToScriptHash();
this.Manifest = ContractManifest.CreateDefault(this.Hash);

this.Manifest.Abi = new ContractAbi()
{
Hash = Hash,
8 changes: 4 additions & 4 deletions neo/SmartContract/Native/PolicyContract.cs
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ public PolicyContract() : base()
Type = ContractParameterType.Integer
}
},
ReturnType = ContractParameterType.Integer
ReturnType = ContractParameterType.Boolean
},
new ContractMethodWithReturnDefinition()
{
@@ -78,7 +78,7 @@ public PolicyContract() : base()
Type = ContractParameterType.Integer
}
},
ReturnType = ContractParameterType.Integer
ReturnType = ContractParameterType.Boolean
},
new ContractMethodWithReturnDefinition()
{
@@ -91,7 +91,7 @@ public PolicyContract() : base()
Type = ContractParameterType.Integer
}
},
ReturnType = ContractParameterType.Integer
ReturnType = ContractParameterType.Boolean
},
new ContractMethodWithReturnDefinition()
{
@@ -104,7 +104,7 @@ public PolicyContract() : base()
Type = ContractParameterType.Integer
}
},
ReturnType = ContractParameterType.Integer
ReturnType = ContractParameterType.Boolean
},

new ContractMethodWithReturnDefinition()