Skip to content

Commit 4e82f29

Browse files
committed
Replace arwentools with vmtools where appropriate
1 parent 8a54a0c commit 4e82f29

12 files changed

Lines changed: 28 additions & 41 deletions

File tree

erdpy/CLI.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ usage: erdpy deps install [-h] ...
11851185
Install dependencies or elrond-sdk modules.
11861186
11871187
positional arguments:
1188-
{llvm,clang,cpp,arwentools,rust,nodejs,elrond_go,elrond_proxy_go,golang,mcl_signer}
1188+
{llvm,clang,cpp,vmtools,rust,nodejs,elrond_go,elrond_proxy_go,golang,mcl_signer}
11891189
the dependency to install
11901190
11911191
optional arguments:
@@ -1204,7 +1204,7 @@ usage: erdpy deps check [-h] ...
12041204
Check whether a dependency is installed.
12051205
12061206
positional arguments:
1207-
{llvm,clang,cpp,arwentools,rust,nodejs,elrond_go,elrond_proxy_go,golang,mcl_signer}
1207+
{llvm,clang,cpp,vmtools,rust,nodejs,elrond_go,elrond_proxy_go,golang,mcl_signer}
12081208
the dependency to check
12091209
12101210
optional arguments:

erdpy/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ def get_defaults() -> Dict[str, Any]:
148148
"proxy": "https://testnet-gateway.elrond.com",
149149
"chainID": "T",
150150
"txVersion": "1",
151-
"dependencies.arwentools.tag": "latest",
151+
"dependencies.vmtools.tag": "latest",
152152
"dependencies.elrond_wasm_rs.tag": "latest",
153-
"dependencies.arwentools.urlTemplate.linux": "https://github.com/ElrondNetwork/arwen-wasm-vm/archive/{TAG}.tar.gz",
154-
"dependencies.arwentools.urlTemplate.osx": "https://github.com/ElrondNetwork/arwen-wasm-vm/archive/{TAG}.tar.gz",
153+
"dependencies.vmtools.urlTemplate.linux": "https://github.com/ElrondNetwork/wasm-vm/archive/{TAG}.tar.gz",
154+
"dependencies.vmtools.urlTemplate.osx": "https://github.com/ElrondNetwork/wasm-vm/archive/{TAG}.tar.gz",
155155
"dependencies.llvm.tag": "v9-19feb",
156156
"dependencies.llvm.urlTemplate.linux": "https://ide.elrond.com/vendor-llvm/{TAG}/linux-amd64.tar.gz?t=19feb",
157157
"dependencies.llvm.urlTemplate.osx": "https://ide.elrond.com/vendor-llvm/{TAG}/darwin-amd64.tar.gz?t=19feb",

erdpy/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VM_TYPE_SYSTEM = "0001"
2-
VM_TYPE_ARWEN = "0500"
2+
VM_TYPE_WASM_VM = "0500"
33
SC_HEX_PUBKEY_PREFIX = "0" * 16
44
SC_HEX_PUBKEY_PREFIX_SYSTEM = SC_HEX_PUBKEY_PREFIX + VM_TYPE_SYSTEM + "0" * 30
5-
SC_HEX_PUBKEY_PREFIX_ARWEN = SC_HEX_PUBKEY_PREFIX + VM_TYPE_ARWEN
5+
SC_HEX_PUBKEY_PREFIX_WASM_VM = SC_HEX_PUBKEY_PREFIX + VM_TYPE_WASM_VM

erdpy/contracts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def deploy(self, owner: Account, arguments: List[Any], gas_price: int, gas_limit
5252
return tx
5353

5454
def prepare_deploy_transaction_data(self, arguments: List[Any]):
55-
tx_data = f"{self.bytecode}@{constants.VM_TYPE_ARWEN}@{self.metadata.to_hex()}"
55+
tx_data = f"{self.bytecode}@{constants.VM_TYPE_WASM_VM}@{self.metadata.to_hex()}"
5656

5757
for arg in arguments:
5858
tx_data += f"@{_prepare_argument(arg)}"

erdpy/dependencies/install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Dict, List
44

55
from erdpy import config, errors
6-
from erdpy.dependencies.modules import (ArwenToolsModule, DependencyModule,
6+
from erdpy.dependencies.modules import (VMToolsModule, DependencyModule,
77
GolangModule, MclSignerModule,
88
NodejsModule, Rust, StandaloneModule)
99

@@ -47,7 +47,7 @@ def get_deps_dict() -> Dict[str, DependencyModule]:
4747
def get_all_deps() -> List[DependencyModule]:
4848
return [
4949
StandaloneModule(key="llvm", aliases=["clang", "cpp"]),
50-
ArwenToolsModule(key="arwentools"),
50+
VMToolsModule(key="vmtools"),
5151
Rust(key="rust"),
5252
NodejsModule(key="nodejs", aliases=[]),
5353
StandaloneModule(key="elrond_go", repo_name="elrond-go", organisation="ElrondNetwork"),

erdpy/dependencies/modules.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,19 @@ def _get_archive_path(self, tag: str) -> Path:
143143
return archive
144144

145145

146-
class ArwenToolsModule(StandaloneModule):
146+
class VMToolsModule(StandaloneModule):
147147
def __init__(self, key: str, aliases: List[str] = None):
148148
if aliases is None:
149149
aliases = list()
150150

151151
super().__init__(key, aliases)
152-
self.repo_name = 'arwen-wasm-vm'
152+
self.repo_name = 'wasm-vm'
153153
self.organisation = 'ElrondNetwork'
154154

155155
def _post_install(self, tag: str):
156156
dependencies.install_module('golang')
157157

158-
self.build_binary(tag, 'arwendebug')
159158
self.build_binary(tag, 'test')
160-
161-
self.make_binary_symlink_in_parent_folder(tag, 'arwendebug', 'arwendebug')
162159
self.make_binary_symlink_in_parent_folder(tag, 'test', 'mandos-test')
163160
self.copy_libwasmer_in_parent_directory(tag)
164161

erdpy/projects/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def run_tests(args: Any):
5858

5959
logger.info("run_tests.project: %s", project)
6060

61-
dependencies.install_module("arwentools")
61+
dependencies.install_module("vmtools")
6262

6363
guards.is_directory(project)
6464
project = load_project(project)

erdpy/projects/project_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ def default_config(self):
9797
return dict()
9898

9999
def run_tests(self, tests_directory: str, wildcard: str = ""):
100-
arwentools = cast(StandaloneModule, dependencies.get_module_by_key("arwentools"))
101-
tool_env = arwentools.get_env()
102-
tool = path.join(arwentools.get_parent_directory(), "mandos-test")
100+
vmtools = cast(StandaloneModule, dependencies.get_module_by_key("vmtools"))
101+
tool_env = vmtools.get_env()
102+
tool = path.join(vmtools.get_parent_directory(), "mandos-test")
103103
test_folder = path.join(self.directory, tests_directory)
104104

105105
if not wildcard:

erdpy/scope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def initialize():
2525
testnet_config = TestnetConfiguration.from_file(testnet_toml)
2626
proxy = f"http://localhost:{testnet_config.proxy_port()}"
2727
except FileNotFoundError:
28-
logger.warn("components of the testnet may be missing")
28+
pass
2929

3030

3131
def get_chain_id():

erdpy/testnet/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,16 +296,16 @@ def proxy_port(self):
296296
def loglevel(self) -> str:
297297
return self.features.get("loglevel", "")
298298

299-
def arwen_binary(self) -> bool:
300-
return self.features.get("arwen_binary", False)
299+
def wasm_vm_binary(self) -> bool:
300+
return self.features.get("wasm_vm_binary", False)
301301

302302
@classmethod
303303
def default(cls):
304304
config = dict()
305305
config['features'] = {
306306
'loglevel': '*:DEBUG',
307307
'proxy': True,
308-
'arwen_binary': False
308+
'wasm_vm_binary': False
309309
}
310310
config['folders'] = {
311311
'elrond_go':

0 commit comments

Comments
 (0)