-
Notifications
You must be signed in to change notification settings - Fork 465
Exchange & Proxy Integration Tests - ERC1155 #1673
Exchange & Proxy Integration Tests - ERC1155 #1673
Conversation
c0eef21
to
49ccb98
Compare
403a815
to
06d591c
Compare
faba871
to
b2f9b07
Compare
4e72b93
to
5e62bde
Compare
12eeed4
to
441b379
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't review the actual Solidity and someone else should make sure the tests actually test what they intend to test, but I reviewed the dev tooling changes and they look solid.
@@ -0,0 +1,268 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How this already been reviewed elsewhere? Are we duplicating Solidity source code within the monorepo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup! Been reviewed in #1661. Just had to do a cheeky rebase.
packages/types/CHANGELOG.json
Outdated
"pr": 1657 | ||
} | ||
] | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be one CHANGELOG entry.
Eventually we'll also need to add ERC1155 support to OrderWatcher. |
9b2197f
to
32b0b0b
Compare
5e62bde
to
fefd068
Compare
32b0b0b
to
5cc46b7
Compare
4fa27ec
to
ce6ff86
Compare
75cc676
to
44db7d3
Compare
a33da79
to
22bc1fb
Compare
24859f2
to
ecd604f
Compare
ecd604f
to
d540e4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few small changes, then LGTM!
contracts/asset-proxy/CHANGELOG.json
Outdated
} | ||
] | ||
}, | ||
{ | ||
"timestamp": 1551479279, | ||
"version": "1.0.9", | ||
"version": "1.å.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo?
const tokensToTransfer = erc1155FungibleTokens.slice(0, 1); | ||
const valuesToTransfer = [new BigNumber(25)]; | ||
const valueMultiplier = new BigNumber(23); | ||
const receiverCallbackData = '0x0102030405'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This data is just being ignored since both parties are EOAs, correct? It might be good to explicitly test for when the callback data is null as well.
}); | ||
it('should allow an order exchanging erc1155 assets to be partially filled', async () => { | ||
// NOTICE: | ||
// As-per the eip1155 standard, there is no way to distinguish between a fungible or non-fungible erc1155 assets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't a partial transfer of a non-fungible still fail with TRANSFER_FAILED
? Whatever the behavior is, we should add a test for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We chatted about this offline.
Partial fills on non-fungible assets should be prohibited by the maker by setting the amount to 1. The proxy cannot distinguish between fungible and non-fungible assets, so it cannot force partial fills to fail in this scenario. If the amount is not set to 1 and an asset is non-fungible then the behavior depends on the implementation of the ERC1155 contract.
8dff829
to
98c6fa1
Compare
Description
Integration tests for the ERC1155 proxy with the Mutli-Asset Proxy and Exchange.
Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.