Updated changelogs and documentation for erc1155 proxy
This commit is contained in:
parent
ae51cfe8b9
commit
1e5648111e
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add ERC1155Proxy",
|
||||
"pr": 1661
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
|
@ -1,15 +1,4 @@
|
||||
[
|
||||
{
|
||||
"name": "ERC1155Proxy",
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add ERC1155Proxy implementation",
|
||||
"pr": 0,
|
||||
"networks": {
|
||||
}
|
||||
}
|
||||
]
|
||||
{
|
||||
"name": "MultiAssetProxy",
|
||||
"version": "1.0.0",
|
||||
|
@ -124,7 +124,7 @@ describe('ERC1155Proxy', () => {
|
||||
});
|
||||
it('should have an id of 0x9645780d', async () => {
|
||||
const proxyId = await erc1155Proxy.getProxyId.callAsync();
|
||||
// proxy computed using -- bytes4(keccak256("erc1155Contract(address,uint256[],uint256[],bytes)"));
|
||||
// proxy computed using -- bytes4(keccak256("erc1155Token(address,uint256[],uint256[],bytes)"));
|
||||
const expectedProxyId = '0x9645780d';
|
||||
expect(proxyId).to.equal(expectedProxyId);
|
||||
});
|
||||
@ -538,7 +538,7 @@ describe('ERC1155Proxy', () => {
|
||||
receiverCallbackData,
|
||||
authorized,
|
||||
),
|
||||
RevertReason.nftNotOwnedByFromAddress,
|
||||
RevertReason.NFTNotOwnedByFromAddress,
|
||||
);
|
||||
});
|
||||
it('should revert if tansferring 0 amount of any token', async () => {
|
||||
@ -571,7 +571,7 @@ describe('ERC1155Proxy', () => {
|
||||
receiverCallbackData,
|
||||
authorized,
|
||||
),
|
||||
RevertReason.transferGreaterThanZeroRequired,
|
||||
RevertReason.TransferGreaterThanZeroRequired,
|
||||
);
|
||||
});
|
||||
it('should revert if there is a multiplication overflow', async () => {
|
||||
@ -635,7 +635,7 @@ describe('ERC1155Proxy', () => {
|
||||
receiverCallbackData,
|
||||
authorized,
|
||||
),
|
||||
RevertReason.amountEqualToOneRequired,
|
||||
RevertReason.AmountEqualToOneRequired,
|
||||
);
|
||||
});
|
||||
it('should revert if transferring > 1 instances of a non-fungible token (`valuesToTransfer` field >1)', async () => {
|
||||
@ -664,7 +664,7 @@ describe('ERC1155Proxy', () => {
|
||||
receiverCallbackData,
|
||||
authorized,
|
||||
),
|
||||
RevertReason.amountEqualToOneRequired,
|
||||
RevertReason.AmountEqualToOneRequired,
|
||||
);
|
||||
});
|
||||
it('should revert if sender balance is insufficient', async () => {
|
||||
|
@ -52,7 +52,7 @@ export class ERC1155ProxyWrapper {
|
||||
*/
|
||||
public async deployDummyContractsAsync(): Promise<Erc1155Wrapper[]> {
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
for (const i of _.times(constants.NUM_DUMMY_ERC1155_TO_DEPLOY)) {
|
||||
for (const i of _.times(constants.NUM_DUMMY_ERC1155_CONTRACTS_TO_DEPLOY)) {
|
||||
const erc1155Contract = await ERC1155MintableContract.deployFrom0xArtifactAsync(
|
||||
artifacts.ERC1155Mintable,
|
||||
this._provider,
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"version": "3.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Added ERC1155Proxy test constants and interfaces",
|
||||
"pr": 1661
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "3.0.9",
|
||||
"changes": [
|
||||
|
@ -38,7 +38,7 @@ export const constants = {
|
||||
NUM_DUMMY_ERC20_TO_DEPLOY: 3,
|
||||
NUM_DUMMY_ERC721_TO_DEPLOY: 2,
|
||||
NUM_ERC721_TOKENS_TO_MINT: 2,
|
||||
NUM_DUMMY_ERC1155_TO_DEPLOY: 1,
|
||||
NUM_DUMMY_ERC1155_CONTRACTS_TO_DEPLOY: 1,
|
||||
NUM_ERC1155_FUNGIBLE_TOKENS_MINT: 3,
|
||||
NUM_ERC1155_NONFUNGIBLE_TOKENS_MINT: 3,
|
||||
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": "7.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Added `encodeERC721AssetData` and `decodeERC721AssetData`",
|
||||
"note": "Added encoding/decoding fdor ERC1155 asset data",
|
||||
"pr": 1661
|
||||
}
|
||||
]
|
||||
|
@ -310,7 +310,7 @@ export enum RevertReason {
|
||||
TransferRejected = 'TRANSFER_REJECTED',
|
||||
Uint256Underflow = 'UINT256_UNDERFLOW',
|
||||
// ERC1155 Proxy
|
||||
transferGreaterThanZeroRequired = 'TRANSFER_GREATER_THAN_ZERO_REQUIRED',
|
||||
TransferGreaterThanZeroRequired = 'TRANSFER_GREATER_THAN_ZERO_REQUIRED',
|
||||
}
|
||||
|
||||
export enum StatusCodes {
|
||||
|
Loading…
x
Reference in New Issue
Block a user