Commit graph

39 commits

Author SHA1 Message Date
Roman Khimov
7945097543 native: fix ContractManagement's call flags for update/deploy
See neo-project/neo#2653.
2022-02-01 12:21:00 +03:00
Evgeniy Stratonikov
1154eae3cd examples: use proper interop version in go.mod
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-25 12:37:26 +03:00
Evgeniy Stratonikov
ad65d1fa1f compiler: implement custom logic for go1.15
For some reason `foo.go` is interpreted as an http URL, and even if we
replace it with `./foo.go` there is an errors with file missing on disk.
Because `CompileWithOptions` should be able to compile file under any
circumstances, we allocate temporary directory base on version used to
compile a binary.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-21 17:43:28 +03:00
Evgeniy Stratonikov
d19c0492d4 examples: use a separate go.mod for each contract
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-21 10:22:29 +03:00
Anna Shaleva
5593d51d1a examples: adjust NEP17 and token-sale examples
Do not store zero receiver balance in the contract storage.
2021-11-08 14:00:57 +03:00
Roman Khimov
42a9d3d7b8 nef: add Source field
Follow neo-project/neo#2605.
2021-09-24 00:19:37 +03:00
Alex Vanin
90400d951a examples: add missing permission methods in manifests 2021-06-24 16:00:45 +03:00
Anna Shaleva
366e79b9b8 core: rename Neo.Crypto.CheckSig interop 2021-05-11 18:37:55 +03:00
Anna Shaleva
2f07d1aa9e examples: update owner address 2021-03-22 18:12:56 +03:00
Evgeniy Stratonikov
c57972d0a7 examples: add onNEP17Payment invocation 2021-02-11 17:51:44 +03:00
Evgenii Stratonikov
ec1ff42872 manifest: add Safe flag for NEP-17 methods 2020-12-10 18:04:49 +03:00
Evgenii Stratonikov
75a9a42403 compiler: check emitted event names
Check that all `Notify` invocations in source correspond to some event
in manifest.
Helpful for typos such as `transfer` instead of `Transfer`.
2020-11-26 13:49:58 +03:00
Evgenii Stratonikov
25f1db6de0 compiler: check supported standards
Check that emitted manifest complies with supported standards.
This can be made a separate flag.
2020-11-26 12:51:39 +03:00
Evgenii Stratonikov
31eca342eb *: replace all NEP5 occurences to NEP17 2020-11-24 13:08:24 +03:00
Evgenii Stratonikov
b97dfae8d8 native: replace NEP-5 with NEP-17 2020-11-24 13:08:23 +03:00
Evgenii Stratonikov
c849176be7 manifest: include contract Name 2020-11-24 11:23:44 +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
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
e2b22bc511 examples: fix ANT token example
We don't have totalSupply in contract storage because we did't put it
there. Fixed.
2020-08-11 18:25:39 +03:00
Anna Shaleva
de8db692f4 examples: add .yml configuration files 2020-08-11 13:42:06 +03:00
Anna Shaleva
ae3f15523c examples: update examples
Closes #1234
2020-08-11 13:42:06 +03:00
Evgenii Stratonikov
d1ef9e67be examples: fix method names
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-07-31 12:07:07 +03:00
Anna Shaleva
08ae869028 examples: update ANT owner for workshop 2020-07-07 15:57:17 +03:00
Anna Shaleva
db8cb752e3 examples: update methods signatures
Update methods signatures in order to generate correct manifest files
with full description of available methods.
2020-07-07 15:57:12 +03:00
Anna Shaleva
53ff02f1ad examples: fix typo in method argument 2020-07-07 15:54:45 +03:00
Roman Khimov
d81d826bfc core: fix Storage.Get to return Null when there is no value
Match C# implementation and fix state inconsistency at block 249920 of
preview2 testnet. Make our Go Storage.Get return nil and adapt
examples/tests.
2020-06-24 10:43:58 +03:00
Roman Khimov
5f276de003
Merge pull request #1057 from nspcc-dev/fix/newaddress
Update addresses to NEO3 format
2020-06-17 16:25:32 +03:00
Evgenii Stratonikov
7b4ca57e33 *: change address to the new format
NEO3 uses new prefix for address (53 = 0x35), thus string representations as
well as encrypted WIFs should be changed.
2020-06-17 15:58:21 +03:00
Evgenii Stratonikov
ad2a75a500 core: move System.ExecutionEngine.* interops to System.Runtime.* 2020-06-16 12:30:55 +03:00
alexvanin
7f3392680d examples: Use "or" operator in transfer check of NEP5 token
CanTransfer function checks if "to" and "from" values are
correct script hashes. If one of these values is correct and one
incorrect, then function returns false positive result. It uses "and"
operator which requires both "to" and "from" script hashes to be
incorrect to fail transaction.

Instead transaction must fail if at least one argument is incorrect,
so it should be "or" operator.
2020-05-12 16:49:04 +03:00
Anna Shaleva
c84c33d398 examples: add nep5 mint function
Add Mint(...) to NEP5 for initial tokens supply.
2020-04-03 12:26:13 +03:00
Roman Khimov
e41d434a49 *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
Roman Khimov
30eb137200 examples: remove underscores from package names
Fixes golint warnings: "don't use an underscore in package name" and makes our
examples better. Refs. #213.
2019-09-03 18:00:10 +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
Jeroen Peeters
df173c295d chore: change CompareBytes to EqualBytes (CityOfZion/neo-storm#22)
* chore: change CompareBytes to EqualBytes

* chore: remove trailing spaces

* chore: rename EqualBytes to Equals

Imported from CityOfZion/neo-storm (da16e967d9631e132488731a42966bccb5ad7f30).
2019-08-14 19:14:06 +03:00
Anthony De Meulemeester
f14833893c CityOfZion/neo-storm#17 Implemented util.CompareBytes (CityOfZion/neo-storm#21)
Imported from CityOfZion/neo-storm (c0ee185a7cfd2c222fb7b4c8ca19885844d53855).
2019-08-14 19:14:05 +03:00
Anthony De Meulemeester
b997eeb051 fixed token example and fixed compiler test with multiple dirs (CityOfZion/neo-storm#20)
Imported from CityOfZion/neo-storm (2d0814a04c34f320dee41674066ccd766a7a8ea1).
2019-08-14 19:14:05 +03:00
Jeroen Peeters
1f8ccdba16 chore: move token example to nep5 as package name (CityOfZion/neo-storm#19)
* feat: add token example

* feat: code splitted package

* feat: use updated apis

* chore: change token namespace to nep5

* chore: add transfer event and readme updates

Imported from CityOfZion/neo-storm (63ec2d7dc23a60f128a8b383ceda1eaa15d919c1).
2019-08-14 19:14:05 +03:00
Jeroen Peeters
b3037cd598 Token Example (CityOfZion/neo-storm#12)
* feat: add token example

* feat: code splitted package

* feat: use updated apis

Imported from CityOfZion/neo-storm (e2bab450d7355b559ae2d70a87f557e8a6dbfff6).
2019-08-14 19:14:05 +03:00