Sitelet https://github.com/Vectorized/solady/commit/ca360ad27aaf28f4dc6e889570bea0cf999dcc2d
Skip to content

Commit ca360ad

Browse files
authored
👷‍♂️ Fix Wake ERC-1155 test (#1295)
1 parent 98c4d06 commit ca360ad

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

‎ext/wake/test_erc1155.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ def test_erc1155_mint_burn():
203203
erc1155.burn(b, 0, 2 ** 256 - 1, from_=b)
204204

205205
# ids and amounts length mismatch
206-
with must_revert(ERC1155Mock.ArrayLengthsMismatch):
206+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.ArrayLengthsMismatch.selector)):
207207
erc1155.batchMint(b, [0, 1], [100], b"", from_=a)
208208

209209
# ids and amounts length mismatch
210-
with must_revert(ERC1155Mock.ArrayLengthsMismatch):
210+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.ArrayLengthsMismatch.selector)):
211211
erc1155.batchBurn(b, [0, 1], [100], from_=a)
212212

213213
# mint to zero address
@@ -257,7 +257,7 @@ def test_erc1155_transfers():
257257
assert erc1155.balanceOfBatch([a, a, b, a], [0, 1, 0, 2]) == [50, 100, 50, 0]
258258

259259
# owners and ids length mismatch
260-
with must_revert(ERC1155Mock.ArrayLengthsMismatch):
260+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.ArrayLengthsMismatch.selector)):
261261
assert erc1155.balanceOfBatch([a, a, b], [0, 1, 0, 2]) == [50, 100, 50, 0]
262262

263263
# not owner nor approved
@@ -282,9 +282,9 @@ def test_erc1155_transfers():
282282
erc1155.safeTransferFrom(a, b, 0, 2 ** 256 - 1 - 49, b"", from_=a)
283283

284284
# transfer to non-erc1155 receiver
285-
with must_revert(ERC1155Mock.TransferToNonERC1155ReceiverImplementer):
285+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.TransferToNonERC1155ReceiverImplementer.selector)):
286286
erc1155.safeTransferFrom(a, erc1155, 0, 50, b"", from_=a)
287-
with must_revert(ERC1155Mock.TransferToNonERC1155ReceiverImplementer):
287+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.TransferToNonERC1155ReceiverImplementer.selector)):
288288
erc1155.safeBatchTransferFrom(a, erc1155, [0], [50], b"", from_=a)
289289

290290
# clear balances
@@ -297,7 +297,7 @@ def test_erc1155_transfers():
297297
erc1155.safeBatchTransferFrom(a, b, [0, 1], [70, 30], b"", from_=a)
298298
assert erc1155.balanceOfBatch([a, a, b, b], [0, 1, 0, 1]) == [30, 70, 70, 30]
299299

300-
with must_revert(ERC1155Mock.ArrayLengthsMismatch()):
300+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.ArrayLengthsMismatch.selector)):
301301
erc1155.safeBatchTransferFrom(a, b, [0, 1], [30], b"", from_=a)
302302

303303
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.TransferToZeroAddress.selector)):
@@ -427,17 +427,17 @@ def test_erc1155_unchecked():
427427
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.AccountBalanceOverflow.selector)):
428428
erc1155.safeBatchTransferUnchecked(a, a, b, [0, 0], [9, 21], b"", from_=c)
429429

430-
with must_revert(ERC1155Mock.ArrayLengthsMismatch):
430+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.ArrayLengthsMismatch.selector)):
431431
erc1155.safeBatchTransferUnchecked(Address.ZERO, a, b, [0], [100, 100], b"", from_=c)
432432

433-
with must_revert(ERC1155Mock.TransferToNonERC1155ReceiverImplementer):
433+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.TransferToNonERC1155ReceiverImplementer.selector)):
434434
erc1155.safeTransferUnchecked(Address.ZERO, a, erc1155, 0, 100, b"", from_=c)
435435

436-
with must_revert(ERC1155Mock.TransferToNonERC1155ReceiverImplementer):
436+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.TransferToNonERC1155ReceiverImplementer.selector)):
437437
erc1155.safeTransferUnchecked(a, a, erc1155, 0, 100, b"", from_=c)
438438

439-
with must_revert(ERC1155Mock.TransferToNonERC1155ReceiverImplementer):
439+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.TransferToNonERC1155ReceiverImplementer.selector)):
440440
erc1155.safeBatchTransferUnchecked(Address.ZERO, a, erc1155, [0], [100], b"", from_=c)
441441

442-
with must_revert(ERC1155Mock.TransferToNonERC1155ReceiverImplementer):
442+
with must_revert(UnknownTransactionRevertedError(ERC1155Mock.TransferToNonERC1155ReceiverImplementer.selector)):
443443
erc1155.safeBatchTransferUnchecked(a, a, erc1155, [0], [100], b"", from_=c)

0 commit comments

Comments
 (0)