Paweł Bylica
d128fe45d7
Introduce EVMC_STORAGE_NON_EXISTING_ACCOUNT for set_storage() Host method
2018-09-06 23:12:00 +02:00
Paweł Bylica
f41fccd21e
Add test for EVMC_SET_OPTION_INVALID_VALUE
2018-09-06 17:57:49 +02:00
Paweł Bylica
8ea48035ea
examples: Make some example Host methods a bit more interesting
2018-09-06 14:21:51 +02:00
Paweł Bylica
b8b3719fb9
Return bool from evmc_get_code_size_fn()
2018-09-06 14:21:51 +02:00
Paweł Bylica
d6ef551541
Return bool from evmc_get_code_hash_fn()
2018-09-06 14:21:51 +02:00
Paweł Bylica
ca85b77f57
Return bool from evmc_get_balance_fn()
2018-09-06 14:21:51 +02:00
Alex Beregszaszi
50c254fb98
Introduce evmc_set_option_result enum
2018-09-06 09:54:09 +01:00
Paweł Bylica
280ff99363
Use bool type instead of int with 1 and 0
2018-09-06 00:28:27 +02:00
Paweł Bylica
9a2d07e595
Remove code hash from evmc_message
2018-09-03 19:58:57 +02:00
Paweł Bylica
ced1c2676f
examples: Better get_block_hash example
2018-09-03 17:24:15 +02:00
Alex Beregszaszi
d9f7ff25f5
Add return code to get_block_hash_fn
2018-09-03 16:45:08 +02:00
Paweł Bylica
e2cff68587
Rename context_fn_table to host_interface
2018-08-31 13:39:41 +02:00
Paweł Bylica
759e67a1c6
Rename examplevm to example-vm
2018-08-31 13:10:07 +02:00
Paweł Bylica
0bb3a67284
CMake: Flatten examplevm
2018-08-31 13:10:07 +02:00
Paweł Bylica
f858f79e2a
CMake: Flatten example_host
2018-08-31 13:10:06 +02:00
Paweł Bylica
98213f93ec
Add back main example that uses example Host and VM
2018-08-31 13:09:05 +02:00
Paweł Bylica
78888b57a9
Create header for example_host
2018-08-31 13:09:04 +02:00
Paweł Bylica
43dce45a5b
Create context in example host
2018-08-31 13:09:04 +02:00
Paweł Bylica
5aefc4faf3
Replace capi.c example with example_host.cpp
2018-08-31 13:09:04 +02:00
Alex Beregszaszi
0403343779
Return evmc_tx_context in get_tx_context (as opposed to pointer parameter)
2018-08-30 14:03:50 +01:00
Paweł Bylica
3c86a6b934
Return result from call_fn
...
This changes the evmc_call_fn signature to return evmc_result object instead of getting result as an output parameter.
2018-08-29 23:00:27 +02:00
Paweł Bylica
a777a13f87
Include project version in examplevm
2018-08-28 20:34:48 +01:00
Alex Beregszaszi
8726fc9a33
Use nicer example EVM bytecode in examples/capi.c
2018-08-28 20:34:38 +01:00
Alex Beregszaszi
3403282827
Do not keep sample EVM code as hex string, but as proper binary in examples/examplevm
2018-08-28 20:34:38 +01:00
Paweł Bylica
43fc619a7e
Update license note in headers of source files
2018-08-22 13:57:25 +02:00
Paweł Bylica
0659e24db0
Update copyright notice
2018-08-21 09:44:18 +02:00
Paweł Bylica
36b7976121
Merge pull request #68 from ethereum/abi-version-helper
...
Add evmc_is_abi_compatible helper
2018-08-20 16:23:29 +02:00
Alex Beregszaszi
3fe4f28867
Add evmc_is_abi_compatible helper
2018-08-20 15:05:41 +01:00
Alex Beregszaszi
f014e4fc77
Add evmc_execute helper
2018-08-20 14:59:52 +01:00
Alex Beregszaszi
afed355232
examples: use evmc helpers
2018-08-20 05:24:21 +01:00
Alex Beregszaszi
4e513a6541
examples: use vm instead of jit in capi
2018-08-20 05:23:01 +01:00
Paweł Bylica
e16f19e38d
examples: Rename evm_log() to emit_log()
2018-08-08 15:39:40 +02:00
Paweł Bylica
8cf24c7dd9
Extend set_storage() by reporting the storage status
2018-08-08 15:39:04 +02:00
Andrei Maiboroda
2e25d34c11
Support for EXTCODEHASH
2018-07-31 14:42:13 +02:00
Paweł Bylica
d2ac75f6a8
Do not allow set_tracer function to be null
2018-07-25 18:22:08 +02:00
Paweł Bylica
4ad5b52492
Cleanup examplevm
2018-06-26 10:41:02 +02:00
Paweł Bylica
fda9851e96
CMake: Move examplevm artifacts to parent dir
2018-06-26 10:41:01 +02:00
Paweł Bylica
5372417ca6
Properly export symbols from DLLs
2018-06-25 18:48:03 +02:00
Paweł Bylica
cdd53518b6
Fix building with Visual Studio
2018-06-25 13:20:18 +02:00
Paweł Bylica
9af6c35b48
Add examples how to use CMake packages
2018-06-19 22:30:36 +02:00
Paweł Bylica
cb2288b49d
Merge pull request #14 from ethereum/clang-format-config
...
Add clang-format config
2018-06-16 12:36:00 +02:00
Paweł Bylica
889f8d74b4
Fix compiler warning
2018-06-11 11:44:13 +02:00
Paweł Bylica
4ca2d9c66b
Reformat files
2018-05-11 13:26:58 +02:00
Paweł Bylica
262211ab68
Move evmc.h to include/evmc dir
2018-04-19 09:41:48 +02:00
Paweł Bylica
c5c34599b9
Change naming convention for "create" function
...
Now should be prefixed with "evmc_create_".
2018-04-17 11:11:31 +02:00
Paweł Bylica
630d8be405
Add name and version to evmc_instance
2018-04-17 11:11:30 +02:00
Paweł Bylica
8830ab0d7d
Move examplevm to its own dir
2018-04-13 08:40:13 +02:00
Paweł Bylica
4578e80c38
Use common compiler settings from Cable
2018-04-12 23:01:38 +02:00
Paweł Bylica
a800ae7aa5
Fix examples build config
2018-04-10 14:12:12 +02:00
Alex Beregszaszi
2ec50258cd
Rename evm.h to evmc.h
2018-03-28 14:40:18 +01:00
Alex Beregszaszi
19ce0eb4ab
Rename evm_/EVM_ to evmc_/EVMC_
2018-03-28 14:39:38 +01:00
Paweł Bylica
4d763dadab
Add main CMake script
2018-03-28 15:20:08 +02:00
Paweł Bylica
ccc3106233
EVM-C: Change get_code() to copy_code()
2018-03-27 12:45:22 +02:00
Paweł Bylica
82f1936fa2
EVM-C: Add get_code_size() callback function
2018-03-26 15:08:10 +02:00
Alex Beregszaszi
0877e9d9bd
Do not pollute the header with examplevm_create()
2018-01-24 22:38:17 +00:00
Paweł Bylica
b0de6dcd46
EVM-C: Rename message.address -> message.destination
2018-01-23 11:00:55 +01:00
Dmitri Makarov
a154b61c51
Prepare for LLVM 5.0 upgrade, but still compatible with LLVM 3.9
2017-12-11 20:13:49 +01:00
Paweł Bylica
2e92618966
Fix example
2017-10-24 13:50:35 +02:00
Paweł Bylica
52d6cc55a9
EVM-C: Rename evm_uint160be -> evm_address
2017-09-26 16:51:34 +02:00
Paweł Bylica
7448400879
EVM-C: Rename evm_result::code -> evm_result::status_code
2017-09-26 16:51:34 +02:00
Paweł Bylica
431c9d2def
EVM-C: Rename evm_result_code -> evm_status_code
2017-09-26 14:04:21 +02:00
Paweł Bylica
5ff2b98c14
EVM-C: Remove factory
2017-09-22 19:16:52 +02:00
Paweł Bylica
61d533aad7
EVM-C: Move ABI version from factory to instance
2017-09-22 18:50:20 +02:00
Paweł Bylica
c5ae54f6ee
Rename some vars: mode -> rev
2017-08-20 16:18:27 +02:00
Paweł Bylica
25bc753f0e
EVM-C: Rename evm_mode to evm_revision
2017-08-18 18:32:26 +02:00
Paweł Bylica
581ba3ef2e
EVM-C: Improve execution context opaque struct
2017-08-18 18:29:22 +02:00
Paweł Bylica
9503ac90c2
EVM-C: Improve example
2017-08-18 13:40:25 +02:00
Paweł Bylica
182d7f3876
EVM-C: Reduce query_fn to account_exists_fn
2017-08-08 10:26:52 +02:00
Paweł Bylica
2d2adcb868
EVM-C: Move code query to separated callback function
2017-08-08 10:11:53 +02:00
Paweł Bylica
2aa1623203
EVM-C: Move balance query to separated callback function
2017-08-07 18:45:26 +02:00
Yoichi Hirai
56ccdf9d2f
Split Metropolis into Byzantium and Constantinople
2017-08-02 17:51:49 +02:00
Paweł Bylica
d6224857c4
EVM-C: Collect callbacks in evm_host struct
2017-08-01 15:59:40 +02:00
Paweł Bylica
1bbdc0c0c9
EVM-C: Split get_storage from query callback
2017-06-09 16:16:17 +02:00
Paweł Bylica
34113af8b3
EVM-C: Fix constness, extend examples
2017-06-08 14:48:09 +02:00
Paweł Bylica
06b25bf87d
EVM-C: Simplify set_storage callback
2017-06-08 12:00:04 +02:00
Paweł Bylica
cde8027511
EVM-C: Separate selfdestruct function from state_update one
2017-06-08 11:38:08 +02:00
Paweł Bylica
f7e53a12d0
EVM-C: Separate log function from state_update one
2017-06-08 11:07:03 +02:00
Paweł Bylica
497f92bcb8
EVM-C: Replace evm_result payload with 24 bytes union
2017-05-30 12:47:21 +02:00
Paweł Bylica
cb90d9f35c
EVM-C: change call callback to operate on evm_result type
2017-05-22 16:07:29 +02:00
Paweł Bylica
3ddd4fdc18
Add payload to evm_result (stupid name)
2017-05-11 15:28:57 +02:00
Paweł Bylica
a77c7a8f9c
EVM-C: Update docs
2017-05-08 14:55:04 +02:00
Paweł Bylica
5fd3350b42
EVM-C: Add storage update example
2017-05-04 17:31:30 +01:00
Paweł Bylica
27f3955f8b
EVM-C: Add call kind to evm_message
2017-05-04 17:31:30 +01:00
Paweł Bylica
6d6b2c1928
EVM-C: Include code hash in the message
2017-05-04 17:31:30 +01:00
Paweł Bylica
cc35c5d169
EVM-C: Improve update state callback function
2017-05-04 17:31:30 +01:00
Paweł Bylica
104a4a12c3
EVM-C: Improve query state callback function
2017-05-04 17:31:30 +01:00
Paweł Bylica
58ad722339
EVM-C: Move blockhash query to own function
2017-05-04 17:31:30 +01:00
Paweł Bylica
25a5fe0ceb
EVM-C: Fix C examples
2017-05-04 17:31:30 +01:00
Paweł Bylica
a5625ee80a
EVM-C: Introduce evm_message
2017-05-04 17:31:30 +01:00
Paweł Bylica
6b94734d1a
EVM-C: Clarify docs about result context and releasing
2017-04-25 19:05:49 +02:00
Paweł Bylica
5bab6b8d7e
EVM-C: Fix some issues in the example
2017-04-25 17:01:46 +02:00
Paweł Bylica
c584b84af9
EVM-C: clarify that evm_result::release can be NULL
2017-04-24 18:10:30 +02:00
Paweł Bylica
beac0977f8
EVM-C: Add examples of evm_result usages
2017-04-24 17:32:28 +02:00
Paweł Bylica
faa1aab946
Always build examples if included
2017-01-19 14:32:22 +01:00
Paweł Bylica
66b2ae9663
EVM-C: return by explicit output param
...
In evm_query_fn, return result by explicit output parameter to avoid C ABI issues and inrease portability. C compiler would do the same implicitly.
2017-01-19 14:32:22 +01:00
Paweł Bylica
575337b449
EVM-C: pass callback argument explicitly by pointer
...
We try to avoid C ABI complex rules like passing structs by value to increase portability.
2017-01-19 14:32:22 +01:00
Paweł Bylica
3d2e365661
EVM-C: introduce factory -- simpler interface
...
Replace evm_interface with evm_factory. The factory provides ABI protection and the function for creating EVM instances. After the instance is create you can discard the factory as it is no longer needed.
2017-01-19 14:32:22 +01:00
Paweł Bylica
d1d3ed03ae
Fix example
2016-09-28 16:50:13 +02:00
Paweł Bylica
8b9867c971
EVM-C: Attach result_release function to the result itself
2016-09-27 17:14:19 +02:00
Paweł Bylica
2a99b13573
EVM-C: Replace evm_{uint|hash}256 with single evm_uint256be
...
All values transfered to/from a VM must be passed as big-endian integers.
2016-08-31 11:40:02 +02:00
Paweł Bylica
0b9b01e05c
EVM-C: Simplify evm_hash256 struct
2016-08-28 20:40:20 +02:00
Paweł Bylica
aa1fa5ee32
EVM-C: Add ABI versioning support
2016-08-25 22:02:36 +02:00
Paweł Bylica
93f16f9380
EVM-C: Drop evm_get_info()
2016-08-25 15:01:49 +02:00
Paweł Bylica
2e6b278a59
EVM-C: Rename evm_result_error_code -> evm_result_code
2016-08-25 13:50:11 +02:00
Paweł Bylica
ff8847670d
EVM-C: Update examples
2016-08-25 12:20:39 +02:00
Alex Beregszaszi
6d2b6efa90
EVM-C: update capi.c to reflect the new error handling
2016-08-24 12:43:35 +01:00
Alex Beregszaszi
baeade4d10
EVM-C: rename EVM_RESULT_* to EVM_*
2016-08-24 12:30:52 +01:00
Alex Beregszaszi
f107589c59
EVM-C: rename EVM_EXCEPTION to EVM_CALL_EXCEPTION
2016-08-24 12:30:51 +01:00
Alex Beregszaszi
abc914afd2
EVM-C: include evm_result_outcome in evm_result
2016-08-24 10:47:17 +01:00
Paweł Bylica
530b6684b2
EVM-C: Rename evm_fn_table -> evm_interface
2016-08-23 21:51:42 +02:00
Paweł Bylica
85cdeea4e6
EVM-C: Bring back set_option to ExampleVM
2016-08-23 21:24:22 +02:00
Paweł Bylica
e0ff4b350e
EVM-C: Build examples without #pragma warning suppressions
2016-08-23 21:10:11 +02:00
Paweł Bylica
efb73335c2
Update EVM-C examples
2016-08-23 13:07:33 +02:00
Paweł Bylica
77326672fd
EVM-C: Use int istead of bool type
2016-08-23 11:55:06 +02:00
Alex Beregszaszi
8c2f9d44e8
EVM-C: improve capi.c and compile against ExampleVM
2016-08-22 21:51:43 +01:00
Alex Beregszaszi
2bb6a4a690
EVM-C: include ExampleVM in CMake
2016-08-22 21:39:34 +01:00
Alex Beregszaszi
fc47787b79
EVM-C: include ExampleVM
2016-08-22 21:37:25 +01:00
Paweł Bylica
d26635abc2
EVM-C: get rid of evm_bytes_view type
2016-07-20 14:15:04 +02:00
Paweł Bylica
8684f22c43
Fix build of CAPI example
2016-07-20 13:31:09 +02:00
Paweł Bylica
4198c0d503
EVM-C: Pass logs using evm_update() function
2016-07-05 13:18:36 +02:00
Paweł Bylica
57afb98d2c
Example usage of EVM-C
2016-06-24 11:40:06 +02:00