Commit graph

13 commits

Author SHA1 Message Date
Evgenii Stratonikov
b807fd9e7f compiler: rename engine.AppCall() to contract.Call() 2020-12-10 13:45:10 +03:00
Roman Khimov
286d9185f4 smartcontract: remove contract features
We're featureless now, all contracts have access to storage and payable status
is to be determined via new NEP. Follow neo-project/neo#2060.
2020-11-13 21:26:23 +03:00
Evgenii Stratonikov
37f7363386 interop: return struct pointers where needed
`Transaction`, `Block` and `Contract` are represented as
`Array`s in VM, so we must return pointers.

Revert a1f98f92.
2020-09-09 13:10:04 +03:00
Evgenii Stratonikov
cee1836183 interop: provide missing smartcontract parameter type defs
Contract can have Hash160, Hash256, Signature etc. types which
all map to a `[]byte` in Go. Having synonyms helps us to generate
proper manifest file.
2020-09-09 13:06:44 +03:00
Anna Shaleva
f31ce9289d core: add System.Contract.GetCallFlags interop
Part of #1055.

It returns calling flags of the current context.
2020-07-17 12:35:02 +03:00
Anna Shaleva
842feb2533 core: adjust System.Contract.Update interop
Part of #1055.

We should check contract scripthash against the one provided in manifest
and manifest groups. We shouldn't put on stack anything after return.
And ofcourse, we mast not destroy the old contract at the end, as
`contractDestroy` removes all storage items associated with the
old contract ID (which equals to the new contract ID). We just remove
old contract state - it's enough.
2020-07-17 12:33:44 +03:00
Anna Shaleva
fddad0b475 core: adjust System.Contract.Create interop
Part of #1055.

It should check given scripthash against manifest groups and return the
contract state as a struct (not interop interface).
2020-07-17 09:28:52 +03:00
Evgenii Stratonikov
61cae8d8b1 compiler: implement missing System.Contract.* interops
Support System.Contract.IsStandard/CreateStandardAccount syscall.
2020-06-17 11:38:34 +03:00
Evgenii Stratonikov
f8a11f61b6 core: update *.Contract.* interops
1. Remove GetScript, IsPayable, GetStorageContext.
2. Revert 82319538 related to GetStorageContext.
3. Rename Migrate to Update.
4. Move remaining to System.Contract.*.

Related #1031.
2020-06-11 10:50:35 +03:00
Evgenii Stratonikov
df958caf93 core: add Manifest to state.Contract 2020-06-11 10:45:24 +03:00
Roman Khimov
1e83a5e318 interop/contract: update documentation, fix some interfaces
Some functions were just not correct in their interfaces.
2020-05-26 19:58:59 +03:00
Roman Khimov
e41d434a49 *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
Roman Khimov
a1e3655560 interop: move into pkg/interop, replace pkg/vm/api
neo-storm has developed more wrappers for syscall APIs, so they can and should
be used as a drop-in replacement for pkg/vm/api. Moving it out of vm, as it's
not exactly related to the VM itself.
2019-08-15 19:41:51 +03:00