Skip to content

Commit 5fd13c0

Browse files
Merge pull request #29 from vyperlang/dependencies
chore: update boa
2 parents 068cbce + 8b96fce commit 5fd13c0

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

Diff for: boa_zksync/contract.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ZksyncContract(ABIContract):
3333
def __init__(
3434
self,
3535
compiler_data: ZksyncCompilerData,
36-
name: str,
36+
contract_name: str,
3737
functions: list[ABIFunction],
3838
*args,
3939
value=0,
@@ -55,7 +55,7 @@ def __init__(
5555
self._abi = compiler_data.abi
5656
self.env = Env.get_singleton() if env is None else env
5757
self.filename = filename
58-
self.contract_name = name
58+
self.contract_name = contract_name
5959

6060
# run the constructor if not skipping
6161
if skip_initcode:
@@ -69,7 +69,7 @@ def __init__(
6969

7070
# only now initialize the ABI contract
7171
super().__init__(
72-
name=name,
72+
name=contract_name,
7373
abi=compiler_data.abi,
7474
functions=functions,
7575
address=address,

Diff for: boa_zksync/deployer.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from functools import cached_property
22
from pathlib import Path
3-
from typing import TYPE_CHECKING
3+
from typing import TYPE_CHECKING, Optional
44

55
from boa import Env
66
from boa.contracts.abi.abi_contract import ABIContractFactory
@@ -43,10 +43,12 @@ def _compile(
4343
def from_abi_dict(cls, abi, name="<anonymous contract>", filename=None):
4444
raise NotImplementedError("ZksyncDeployer does not support loading from ABI")
4545

46-
def deploy(self, *args, **kwargs) -> ZksyncContract:
46+
def deploy(
47+
self, *args, contract_name: Optional[str] = None, **kwargs
48+
) -> ZksyncContract:
4749
return ZksyncContract(
4850
self.zkvyper_data,
49-
self._name,
51+
contract_name or self._name,
5052
self.functions,
5153
*args,
5254
filename=self.filename,
@@ -59,14 +61,16 @@ def at(self, address: Address | str) -> ZksyncContract:
5961
"""
6062
return self.deploy(override_address=Address(address), skip_initcode=True)
6163

62-
def deploy_as_blueprint(self, **kwargs) -> ZksyncContract:
64+
def deploy_as_blueprint(
65+
self, contract_name: Optional[str] = None, **kwargs
66+
) -> ZksyncContract:
6367
"""
6468
In zkSync, any contract can be used as a blueprint.
6569
The only difference here is that we don't need to run the constructor.
6670
"""
6771
return ZksyncBlueprint(
6872
self.zkvyper_data,
69-
self._name,
73+
contract_name or self._name,
7074
self.functions,
7175
filename=self.filename,
7276
**kwargs,

Diff for: pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "titanoboa-zksync"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
description = "A Zksync plugin for the Titanoboa Vyper interpreter"
55
license = { file = "LICENSE" }
66
readme = "README.md"
@@ -17,7 +17,7 @@ classifiers = [
1717
]
1818

1919
dependencies = [
20-
"titanoboa==0.2.4",
20+
"titanoboa==0.2.5b1"
2121
]
2222

2323
[project.optional-dependencies]

Diff for: tests/test_boa_loads.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ def get_name_of(addr: HasName) -> String[32]:
126126
assert stack_trace == StackTrace(
127127
[
128128
" Test an error(<CalledContract interface at "
129-
f"{called_addr}> (file CalledContract).name() -> ['string'])",
129+
f"{called_addr}> (file <unknown>).name() -> ['string'])",
130130
" Test an error(<CallerContract interface at "
131131
f"{caller_contract.address}> (file "
132-
"CallerContract).get_name_of(address) -> ['string'])",
132+
"<unknown>).get_name_of(address) -> ['string'])",
133133
" <Unknown contract 0x0000000000000000000000000000000000008009>",
134134
" <Unknown contract 0x0000000000000000000000000000000000008002>",
135135
" Test an error(<CallerContract interface at "
136-
f"{caller_contract.address}> (file CallerContract).get_name_of(address) -> "
136+
f"{caller_contract.address}> (file <unknown>).get_name_of(address) -> "
137137
"['string'])",
138138
]
139139
)

0 commit comments

Comments
 (0)