Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Added remaining erc1155 revert reasons to types package
Browse files Browse the repository at this point in the history
  • Loading branch information
hysz committed Mar 5, 2019
1 parent 1337051 commit 82cafd6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/types/CHANGELOG.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.1.2",
"changes": [
{
"note": "Added `Uint256Underflow`, `TransferRejected`, and `InsufficientAllowance` revert reasons",
"note": "Added ERC1155 revert reasons",
"pr": 1657
}
]
Expand Down
15 changes: 12 additions & 3 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ export enum RevertReason {
InvalidMsgValue = 'INVALID_MSG_VALUE',
InsufficientEthRemaining = 'INSUFFICIENT_ETH_REMAINING',
Uint256Overflow = 'UINT256_OVERFLOW',
Uint256Underflow = 'UINT256_UNDERFLOW',
Erc721ZeroToAddress = 'ERC721_ZERO_TO_ADDRESS',
Erc721OwnerMismatch = 'ERC721_OWNER_MISMATCH',
Erc721InvalidSpender = 'ERC721_INVALID_SPENDER',
Expand All @@ -260,8 +259,6 @@ export enum RevertReason {
TxFullyConfirmed = 'TX_FULLY_CONFIRMED',
TxNotFullyConfirmed = 'TX_NOT_FULLY_CONFIRMED',
TimeLockIncomplete = 'TIME_LOCK_INCOMPLETE',
TransferRejected = 'TRANSFER_REJECTED',
InsufficientAllowance = 'INSUFFICIENT_ALLOWANCE',
// DutchAuction
AuctionInvalidAmount = 'INVALID_AMOUNT',
AuctionExpired = 'AUCTION_EXPIRED',
Expand All @@ -276,6 +273,18 @@ export enum RevertReason {
ToLessThanLengthRequired = 'TO_LESS_THAN_LENGTH_REQUIRED',
InvalidApprovalSignature = 'INVALID_APPROVAL_SIGNATURE',
ApprovalExpired = 'APPROVAL_EXPIRED',
// ERC1155
AmountEqualToOneRequired = 'AMOUNT_EQUAL_TO_ONE_REQUIRED',
BadReceiverReturnValue = 'BAD_RECEIVER_RETURN_VALUE',
CannotTransferToAddressZero = 'CANNOT_TRANSFER_TO_ADDRESS_ZERO',
InsufficientAllowance = 'INSUFFICIENT_ALLOWANCE',
NFTNotOwnedByFromAddress = 'NFT_NOT_OWNED_BY_FROM_ADDRESS',
OwnersAndIdsMustHaveSameLength = 'OWNERS_AND_IDS_MUST_HAVE_SAME_LENGTH',
TokenAndValuesLengthMismatch = 'TOKEN_AND_VALUES_LENGTH_MISMATCH',
TriedToMintFungibleForNonFungibleToken = 'TRIED_TO_MINT_FUNGIBLE_FOR_NON_FUNGIBLE_TOKEN',
TriedToMintNonFungibleForFungibleToken = 'TRIED_TO_MINT_NON_FUNGIBLE_FOR_FUNGIBLE_TOKEN',
TransferRejected = 'TRANSFER_REJECTED',
Uint256Underflow = 'UINT256_UNDERFLOW',
}

export enum StatusCodes {
Expand Down

0 comments on commit 82cafd6

Please sign in to comment.