Compare commits
12 Commits
@0x/contra
...
feat/proto
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4072724866 | ||
|
|
74be3d1d96 | ||
|
|
730b476987 | ||
|
|
84e353aa38 | ||
|
|
151915ec46 | ||
|
|
aa20eaac47 | ||
|
|
ba7599ad39 | ||
|
|
5756d7c563 | ||
|
|
2577caaf5a | ||
|
|
603813191f | ||
|
|
0484519e4d | ||
|
|
275542b6b2 |
@@ -10,6 +10,7 @@ jobs:
|
|||||||
working_directory: ~/repo
|
working_directory: ~/repo
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
- run: git submodule update --init --recursive
|
||||||
- run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV
|
- run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV
|
||||||
- run:
|
- run:
|
||||||
name: install-yarn
|
name: install-yarn
|
||||||
|
|||||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -173,6 +173,15 @@ contracts/zero-ex/test/generated-wrappers/
|
|||||||
contracts/treasury/generated-wrappers/
|
contracts/treasury/generated-wrappers/
|
||||||
contracts/treasury/test/generated-wrappers/
|
contracts/treasury/test/generated-wrappers/
|
||||||
|
|
||||||
|
# foundry artifacts
|
||||||
|
contracts/zero-ex/foundry-artifacts/
|
||||||
|
|
||||||
|
# foundry cache
|
||||||
|
contracts/zero-ex/foundry-cache/
|
||||||
|
|
||||||
|
# typechain wrappers
|
||||||
|
contracts/zero-ex/typechain-wrappers/
|
||||||
|
|
||||||
# Doc README copy
|
# Doc README copy
|
||||||
packages/*/docs/README.md
|
packages/*/docs/README.md
|
||||||
|
|
||||||
|
|||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "contracts/zero-ex/contracts/deps/forge-std"]
|
||||||
|
path = contracts/zero-ex/contracts/deps/forge-std
|
||||||
|
url = https://github.com/foundry-rs/forge-std
|
||||||
@@ -1,13 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"timestamp": 1652919697,
|
|
||||||
"version": "3.3.30",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1650611093,
|
"timestamp": 1650611093,
|
||||||
"version": "3.3.29",
|
"version": "3.3.29",
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v3.3.30 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v3.3.29 - _April 22, 2022_
|
## v3.3.29 - _April 22, 2022_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
|||||||
758
contracts/erc20/contracts/src/v06/WETH9.sol
Normal file
758
contracts/erc20/contracts/src/v06/WETH9.sol
Normal file
@@ -0,0 +1,758 @@
|
|||||||
|
// Copyright (C) 2015, 2016, 2017 Dapphub
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
// solhint-disable
|
||||||
|
pragma solidity ^0.6.5;
|
||||||
|
|
||||||
|
|
||||||
|
contract WETH9 {
|
||||||
|
string public name = "Wrapped Ether";
|
||||||
|
string public symbol = "WETH";
|
||||||
|
uint8 public decimals = 18;
|
||||||
|
|
||||||
|
event Approval(address indexed _owner, address indexed _spender, uint _value);
|
||||||
|
event Transfer(address indexed _from, address indexed _to, uint _value);
|
||||||
|
event Deposit(address indexed _owner, uint _value);
|
||||||
|
event Withdrawal(address indexed _owner, uint _value);
|
||||||
|
|
||||||
|
mapping (address => uint) public balanceOf;
|
||||||
|
mapping (address => mapping (address => uint)) public allowance;
|
||||||
|
|
||||||
|
receive() external payable {
|
||||||
|
deposit();
|
||||||
|
}
|
||||||
|
function deposit() public payable {
|
||||||
|
balanceOf[msg.sender] += msg.value;
|
||||||
|
emit Deposit(msg.sender, msg.value);
|
||||||
|
}
|
||||||
|
function withdraw(uint wad) public {
|
||||||
|
require(balanceOf[msg.sender] >= wad);
|
||||||
|
balanceOf[msg.sender] -= wad;
|
||||||
|
msg.sender.transfer(wad);
|
||||||
|
emit Withdrawal(msg.sender, wad);
|
||||||
|
}
|
||||||
|
|
||||||
|
function totalSupply() public view returns (uint) {
|
||||||
|
return address(this).balance;
|
||||||
|
}
|
||||||
|
|
||||||
|
function approve(address guy, uint wad) public returns (bool) {
|
||||||
|
allowance[msg.sender][guy] = wad;
|
||||||
|
emit Approval(msg.sender, guy, wad);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function transfer(address dst, uint wad) public returns (bool) {
|
||||||
|
return transferFrom(msg.sender, dst, wad);
|
||||||
|
}
|
||||||
|
|
||||||
|
function transferFrom(address src, address dst, uint wad)
|
||||||
|
public
|
||||||
|
returns (bool)
|
||||||
|
{
|
||||||
|
require(balanceOf[src] >= wad);
|
||||||
|
|
||||||
|
if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {
|
||||||
|
require(allowance[src][msg.sender] >= wad);
|
||||||
|
allowance[src][msg.sender] -= wad;
|
||||||
|
}
|
||||||
|
|
||||||
|
balanceOf[src] -= wad;
|
||||||
|
balanceOf[dst] += wad;
|
||||||
|
|
||||||
|
emit Transfer(src, dst, wad);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
|
|
||||||
|
*/
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-erc20",
|
"name": "@0x/contracts-erc20",
|
||||||
"version": "3.3.30",
|
"version": "3.3.29",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -53,8 +53,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.8.0",
|
"@0x/abi-gen": "^5.8.0",
|
||||||
"@0x/contracts-gen": "^2.0.46",
|
"@0x/contracts-gen": "^2.0.46",
|
||||||
"@0x/contracts-test-utils": "^5.4.21",
|
"@0x/contracts-test-utils": "^5.4.20",
|
||||||
"@0x/contracts-utils": "^4.8.11",
|
"@0x/contracts-utils": "^4.8.10",
|
||||||
"@0x/dev-utils": "^4.2.14",
|
"@0x/dev-utils": "^4.2.14",
|
||||||
"@0x/sol-compiler": "^4.8.1",
|
"@0x/sol-compiler": "^4.8.1",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"timestamp": 1652919697,
|
|
||||||
"version": "5.4.21",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1650611093,
|
"timestamp": 1650611093,
|
||||||
"version": "5.4.20",
|
"version": "5.4.20",
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v5.4.21 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v5.4.20 - _April 22, 2022_
|
## v5.4.20 - _April 22, 2022_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-test-utils",
|
"name": "@0x/contracts-test-utils",
|
||||||
"version": "5.4.21",
|
"version": "5.4.20",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.34",
|
"@0x/assert": "^3.0.34",
|
||||||
"@0x/base-contract": "^6.5.0",
|
"@0x/base-contract": "^6.5.0",
|
||||||
"@0x/contract-addresses": "^6.14.0",
|
"@0x/contract-addresses": "^6.13.0",
|
||||||
"@0x/dev-utils": "^4.2.14",
|
"@0x/dev-utils": "^4.2.14",
|
||||||
"@0x/json-schemas": "^6.4.4",
|
"@0x/json-schemas": "^6.4.4",
|
||||||
"@0x/order-utils": "^10.4.28",
|
"@0x/order-utils": "^10.4.28",
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"timestamp": 1652919697,
|
|
||||||
"version": "1.4.13",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1650611093,
|
"timestamp": 1650611093,
|
||||||
"version": "1.4.12",
|
"version": "1.4.12",
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v1.4.13 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v1.4.12 - _April 22, 2022_
|
## v1.4.12 - _April 22, 2022_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-treasury",
|
"name": "@0x/contracts-treasury",
|
||||||
"version": "1.4.13",
|
"version": "1.4.12",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -47,12 +47,12 @@
|
|||||||
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/treasury",
|
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/treasury",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.8.0",
|
"@0x/abi-gen": "^5.8.0",
|
||||||
"@0x/contract-addresses": "^6.14.0",
|
"@0x/contract-addresses": "^6.13.0",
|
||||||
"@0x/contracts-asset-proxy": "^3.7.19",
|
"@0x/contracts-asset-proxy": "^3.7.19",
|
||||||
"@0x/contracts-erc20": "^3.3.30",
|
"@0x/contracts-erc20": "^3.3.29",
|
||||||
"@0x/contracts-gen": "^2.0.46",
|
"@0x/contracts-gen": "^2.0.46",
|
||||||
"@0x/contracts-staking": "^2.0.45",
|
"@0x/contracts-staking": "^2.0.45",
|
||||||
"@0x/contracts-test-utils": "^5.4.21",
|
"@0x/contracts-test-utils": "^5.4.20",
|
||||||
"@0x/sol-compiler": "^4.8.1",
|
"@0x/sol-compiler": "^4.8.1",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
"@0x/tslint-config": "^4.1.4",
|
"@0x/tslint-config": "^4.1.4",
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^6.5.0",
|
"@0x/base-contract": "^6.5.0",
|
||||||
"@0x/protocol-utils": "^11.13.0",
|
"@0x/protocol-utils": "^11.12.0",
|
||||||
"@0x/subproviders": "^6.6.5",
|
"@0x/subproviders": "^6.6.5",
|
||||||
"@0x/types": "^3.3.6",
|
"@0x/types": "^3.3.6",
|
||||||
"@0x/typescript-typings": "^5.3.1",
|
"@0x/typescript-typings": "^5.3.1",
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"timestamp": 1652919697,
|
|
||||||
"version": "4.8.11",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1650611093,
|
"timestamp": 1650611093,
|
||||||
"version": "4.8.10",
|
"version": "4.8.10",
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v4.8.11 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v4.8.10 - _April 22, 2022_
|
## v4.8.10 - _April 22, 2022_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-utils",
|
"name": "@0x/contracts-utils",
|
||||||
"version": "4.8.11",
|
"version": "4.8.10",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.8.0",
|
"@0x/abi-gen": "^5.8.0",
|
||||||
"@0x/contracts-gen": "^2.0.46",
|
"@0x/contracts-gen": "^2.0.46",
|
||||||
"@0x/contracts-test-utils": "^5.4.21",
|
"@0x/contracts-test-utils": "^5.4.20",
|
||||||
"@0x/dev-utils": "^4.2.14",
|
"@0x/dev-utils": "^4.2.14",
|
||||||
"@0x/order-utils": "^10.4.28",
|
"@0x/order-utils": "^10.4.28",
|
||||||
"@0x/sol-compiler": "^4.8.1",
|
"@0x/sol-compiler": "^4.8.1",
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"version": "0.33.0",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Add support for GMX and Platypus to bridge adapter",
|
|
||||||
"pr": 478
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1652919697
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"version": "0.32.0",
|
"version": "0.32.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v0.33.0 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Add support for GMX and Platypus to bridge adapter (#478)
|
|
||||||
|
|
||||||
## v0.32.0 - _April 22, 2022_
|
## v0.32.0 - _April 22, 2022_
|
||||||
|
|
||||||
* Add support for `BalancerV2Batch` fills in FQT (#462)
|
* Add support for `BalancerV2Batch` fills in FQT (#462)
|
||||||
|
|||||||
1
contracts/zero-ex/contracts/deps/forge-std
Submodule
1
contracts/zero-ex/contracts/deps/forge-std
Submodule
Submodule contracts/zero-ex/contracts/deps/forge-std added at 1680d7fb3e
@@ -27,13 +27,14 @@ import "./mixins/MixinBalancer.sol";
|
|||||||
import "./mixins/MixinBalancerV2.sol";
|
import "./mixins/MixinBalancerV2.sol";
|
||||||
import "./mixins/MixinBalancerV2Batch.sol";
|
import "./mixins/MixinBalancerV2Batch.sol";
|
||||||
import "./mixins/MixinBancor.sol";
|
import "./mixins/MixinBancor.sol";
|
||||||
|
import "./mixins/MixinCoFiX.sol";
|
||||||
import "./mixins/MixinCompound.sol";
|
import "./mixins/MixinCompound.sol";
|
||||||
import "./mixins/MixinCurve.sol";
|
import "./mixins/MixinCurve.sol";
|
||||||
import "./mixins/MixinCurveV2.sol";
|
import "./mixins/MixinCurveV2.sol";
|
||||||
import "./mixins/MixinCryptoCom.sol";
|
import "./mixins/MixinCryptoCom.sol";
|
||||||
import "./mixins/MixinDodo.sol";
|
import "./mixins/MixinDodo.sol";
|
||||||
import "./mixins/MixinDodoV2.sol";
|
import "./mixins/MixinDodoV2.sol";
|
||||||
import "./mixins/MixinGMX.sol";
|
import "./mixins/MixinKyber.sol";
|
||||||
import "./mixins/MixinKyberDmm.sol";
|
import "./mixins/MixinKyberDmm.sol";
|
||||||
import "./mixins/MixinLido.sol";
|
import "./mixins/MixinLido.sol";
|
||||||
import "./mixins/MixinMakerPSM.sol";
|
import "./mixins/MixinMakerPSM.sol";
|
||||||
@@ -41,7 +42,6 @@ import "./mixins/MixinMooniswap.sol";
|
|||||||
import "./mixins/MixinMStable.sol";
|
import "./mixins/MixinMStable.sol";
|
||||||
import "./mixins/MixinNerve.sol";
|
import "./mixins/MixinNerve.sol";
|
||||||
import "./mixins/MixinOasis.sol";
|
import "./mixins/MixinOasis.sol";
|
||||||
import "./mixins/MixinPlatypus.sol";
|
|
||||||
import "./mixins/MixinShell.sol";
|
import "./mixins/MixinShell.sol";
|
||||||
import "./mixins/MixinUniswap.sol";
|
import "./mixins/MixinUniswap.sol";
|
||||||
import "./mixins/MixinUniswapV2.sol";
|
import "./mixins/MixinUniswapV2.sol";
|
||||||
@@ -55,13 +55,14 @@ contract BridgeAdapter is
|
|||||||
MixinBalancerV2,
|
MixinBalancerV2,
|
||||||
MixinBalancerV2Batch,
|
MixinBalancerV2Batch,
|
||||||
MixinBancor,
|
MixinBancor,
|
||||||
|
MixinCoFiX,
|
||||||
MixinCompound,
|
MixinCompound,
|
||||||
MixinCurve,
|
MixinCurve,
|
||||||
MixinCurveV2,
|
MixinCurveV2,
|
||||||
MixinCryptoCom,
|
MixinCryptoCom,
|
||||||
MixinDodo,
|
MixinDodo,
|
||||||
MixinDodoV2,
|
MixinDodoV2,
|
||||||
MixinGMX,
|
MixinKyber,
|
||||||
MixinKyberDmm,
|
MixinKyberDmm,
|
||||||
MixinLido,
|
MixinLido,
|
||||||
MixinMakerPSM,
|
MixinMakerPSM,
|
||||||
@@ -69,7 +70,6 @@ contract BridgeAdapter is
|
|||||||
MixinMStable,
|
MixinMStable,
|
||||||
MixinNerve,
|
MixinNerve,
|
||||||
MixinOasis,
|
MixinOasis,
|
||||||
MixinPlatypus,
|
|
||||||
MixinShell,
|
MixinShell,
|
||||||
MixinUniswap,
|
MixinUniswap,
|
||||||
MixinUniswapV2,
|
MixinUniswapV2,
|
||||||
@@ -82,20 +82,20 @@ contract BridgeAdapter is
|
|||||||
MixinBalancer()
|
MixinBalancer()
|
||||||
MixinBalancerV2()
|
MixinBalancerV2()
|
||||||
MixinBancor(weth)
|
MixinBancor(weth)
|
||||||
|
MixinCoFiX()
|
||||||
MixinCompound(weth)
|
MixinCompound(weth)
|
||||||
MixinCurve(weth)
|
MixinCurve(weth)
|
||||||
MixinCurveV2()
|
MixinCurveV2()
|
||||||
MixinCryptoCom()
|
MixinCryptoCom()
|
||||||
MixinDodo()
|
MixinDodo()
|
||||||
MixinDodoV2()
|
MixinDodoV2()
|
||||||
MixinGMX()
|
MixinKyber(weth)
|
||||||
MixinLido(weth)
|
MixinLido(weth)
|
||||||
MixinMakerPSM()
|
MixinMakerPSM()
|
||||||
MixinMooniswap(weth)
|
MixinMooniswap(weth)
|
||||||
MixinMStable()
|
MixinMStable()
|
||||||
MixinNerve()
|
MixinNerve()
|
||||||
MixinOasis()
|
MixinOasis()
|
||||||
MixinPlatypus()
|
|
||||||
MixinShell()
|
MixinShell()
|
||||||
MixinUniswap(weth)
|
MixinUniswap(weth)
|
||||||
MixinUniswapV2()
|
MixinUniswapV2()
|
||||||
@@ -166,7 +166,14 @@ contract BridgeAdapter is
|
|||||||
sellAmount,
|
sellAmount,
|
||||||
order.bridgeData
|
order.bridgeData
|
||||||
);
|
);
|
||||||
}else if (protocolId == BridgeProtocols.MAKERPSM) {
|
} else if (protocolId == BridgeProtocols.KYBER) {
|
||||||
|
boughtAmount = _tradeKyber(
|
||||||
|
sellToken,
|
||||||
|
buyToken,
|
||||||
|
sellAmount,
|
||||||
|
order.bridgeData
|
||||||
|
);
|
||||||
|
} else if (protocolId == BridgeProtocols.MAKERPSM) {
|
||||||
boughtAmount = _tradeMakerPsm(
|
boughtAmount = _tradeMakerPsm(
|
||||||
sellToken,
|
sellToken,
|
||||||
buyToken,
|
buyToken,
|
||||||
@@ -225,6 +232,13 @@ contract BridgeAdapter is
|
|||||||
sellAmount,
|
sellAmount,
|
||||||
order.bridgeData
|
order.bridgeData
|
||||||
);
|
);
|
||||||
|
} else if (protocolId == BridgeProtocols.COFIX) {
|
||||||
|
boughtAmount = _tradeCoFiX(
|
||||||
|
sellToken,
|
||||||
|
buyToken,
|
||||||
|
sellAmount,
|
||||||
|
order.bridgeData
|
||||||
|
);
|
||||||
} else if (protocolId == BridgeProtocols.NERVE) {
|
} else if (protocolId == BridgeProtocols.NERVE) {
|
||||||
boughtAmount = _tradeNerve(
|
boughtAmount = _tradeNerve(
|
||||||
sellToken,
|
sellToken,
|
||||||
@@ -258,18 +272,6 @@ contract BridgeAdapter is
|
|||||||
sellAmount,
|
sellAmount,
|
||||||
order.bridgeData
|
order.bridgeData
|
||||||
);
|
);
|
||||||
} else if (protocolId == BridgeProtocols.GMX) {
|
|
||||||
boughtAmount = _tradeGMX(
|
|
||||||
buyToken,
|
|
||||||
sellAmount,
|
|
||||||
order.bridgeData
|
|
||||||
);
|
|
||||||
} else if (protocolId == BridgeProtocols.PLATYPUS) {
|
|
||||||
boughtAmount = _tradePlatypus(
|
|
||||||
buyToken,
|
|
||||||
sellAmount,
|
|
||||||
order.bridgeData
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
boughtAmount = _tradeZeroExBridge(
|
boughtAmount = _tradeZeroExBridge(
|
||||||
sellToken,
|
sellToken,
|
||||||
|
|||||||
@@ -53,6 +53,4 @@ library BridgeProtocols {
|
|||||||
uint128 internal constant AAVEV2 = 23;
|
uint128 internal constant AAVEV2 = 23;
|
||||||
uint128 internal constant COMPOUND = 24;
|
uint128 internal constant COMPOUND = 24;
|
||||||
uint128 internal constant BALANCERV2BATCH = 25;
|
uint128 internal constant BALANCERV2BATCH = 25;
|
||||||
uint128 internal constant GMX = 26;
|
|
||||||
uint128 internal constant PLATYPUS = 27;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,98 +0,0 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 ZeroEx Intl.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
pragma solidity ^0.6.5;
|
|
||||||
pragma experimental ABIEncoderV2;
|
|
||||||
|
|
||||||
import "@0x/contracts-erc20/contracts/src/v06/LibERC20TokenV06.sol";
|
|
||||||
import "@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol";
|
|
||||||
import "@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol";
|
|
||||||
import "../IBridgeAdapter.sol";
|
|
||||||
|
|
||||||
/*
|
|
||||||
UniswapV2
|
|
||||||
*/
|
|
||||||
interface IGmxRouter {
|
|
||||||
|
|
||||||
// /// @dev Swaps an exact amount of input tokens for as many output tokens as possible, along the route determined by the path.
|
|
||||||
// /// The first element of path is the input token, the last is the output token, and any intermediate elements represent
|
|
||||||
// /// intermediate pairs to trade through (if, for example, a direct pair does not exist).
|
|
||||||
// /// @param _path An array of token addresses. path.length must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
|
|
||||||
// /// @param _amountIn The amount of input tokens to send.
|
|
||||||
// /// @param _minOut The minimum amount of output tokens that must be received for the transaction not to revert.
|
|
||||||
// /// @param _reciever Recipient of the output tokens.
|
|
||||||
function swap(
|
|
||||||
address[] calldata _path, uint256 _amountIn, uint256 _minOut, address _receiver
|
|
||||||
) external;
|
|
||||||
}
|
|
||||||
|
|
||||||
contract MixinGMX {
|
|
||||||
|
|
||||||
using LibERC20TokenV06 for IERC20TokenV06;
|
|
||||||
using LibSafeMathV06 for uint256;
|
|
||||||
|
|
||||||
function _tradeGMX(
|
|
||||||
IERC20TokenV06 buyToken,
|
|
||||||
uint256 sellAmount,
|
|
||||||
bytes memory bridgeData
|
|
||||||
)
|
|
||||||
public
|
|
||||||
returns (uint256 boughtAmount)
|
|
||||||
{
|
|
||||||
address _router;
|
|
||||||
address reader;
|
|
||||||
address vault;
|
|
||||||
address[] memory _path;
|
|
||||||
IGmxRouter router;
|
|
||||||
IERC20TokenV06[] memory path;
|
|
||||||
|
|
||||||
{
|
|
||||||
//decode the bridge data
|
|
||||||
(_router, reader, vault, _path) = abi.decode(bridgeData, (address, address, address, address[]));
|
|
||||||
// To get around `abi.decode()` not supporting interface array types.
|
|
||||||
assembly { path := _path }
|
|
||||||
}
|
|
||||||
|
|
||||||
require(path.length >= 2, "MixinGMX/PATH_LENGTH_MUST_BE_AT_LEAST_TWO");
|
|
||||||
require(
|
|
||||||
path[path.length - 1] == buyToken,
|
|
||||||
"MixinGMX/LAST_ELEMENT_OF_PATH_MUST_MATCH_OUTPUT_TOKEN"
|
|
||||||
);
|
|
||||||
|
|
||||||
//connect to the GMX router
|
|
||||||
router = IGmxRouter(_router);
|
|
||||||
|
|
||||||
// Grant the GMX router an allowance to sell the first token.
|
|
||||||
path[0].approveIfBelow(address(router), sellAmount);
|
|
||||||
|
|
||||||
//track the balance to know how much we bought
|
|
||||||
uint256 beforeBalance = buyToken.balanceOf(address(this));
|
|
||||||
router.swap(
|
|
||||||
// Convert to `buyToken` along this path.
|
|
||||||
_path,
|
|
||||||
// Sell all tokens we hold.
|
|
||||||
sellAmount,
|
|
||||||
// Minimum buy amount.
|
|
||||||
0,
|
|
||||||
// Recipient is `this`.
|
|
||||||
address(this)
|
|
||||||
);
|
|
||||||
|
|
||||||
//calculate the difference in balance from preswap->postswap to find how many tokens out
|
|
||||||
boughtAmount = buyToken.balanceOf(address(this)).safeSub(beforeBalance);
|
|
||||||
|
|
||||||
return boughtAmount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
pragma solidity ^0.6.5;
|
|
||||||
pragma experimental ABIEncoderV2;
|
|
||||||
|
|
||||||
import "@0x/contracts-erc20/contracts/src/v06/LibERC20TokenV06.sol";
|
|
||||||
import "@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol";
|
|
||||||
import "@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol";
|
|
||||||
|
|
||||||
|
|
||||||
interface IPlatypusRouter {
|
|
||||||
|
|
||||||
function swapTokensForTokens(
|
|
||||||
address[] calldata tokenPath,
|
|
||||||
address[] calldata poolPath,
|
|
||||||
uint256 fromAmount,
|
|
||||||
uint256 minimumToAmount,
|
|
||||||
address to,
|
|
||||||
uint256 deadline
|
|
||||||
) external returns (uint256 amountOut, uint256 haircut);
|
|
||||||
}
|
|
||||||
|
|
||||||
contract MixinPlatypus {
|
|
||||||
|
|
||||||
using LibERC20TokenV06 for IERC20TokenV06;
|
|
||||||
using LibSafeMathV06 for uint256;
|
|
||||||
|
|
||||||
function _tradePlatypus(
|
|
||||||
IERC20TokenV06 buyToken,
|
|
||||||
uint256 sellAmount,
|
|
||||||
bytes memory bridgeData
|
|
||||||
)
|
|
||||||
public
|
|
||||||
returns (uint256 boughtAmount)
|
|
||||||
{
|
|
||||||
IPlatypusRouter router;
|
|
||||||
address _router;
|
|
||||||
address[] memory _pool;
|
|
||||||
IERC20TokenV06[] memory path;
|
|
||||||
address[] memory _path;
|
|
||||||
|
|
||||||
{
|
|
||||||
(_router, _pool, _path) = abi.decode(bridgeData, (address, address[], address[]));
|
|
||||||
|
|
||||||
// To get around `abi.decode()` not supporting interface array types.
|
|
||||||
assembly { path := _path }
|
|
||||||
}
|
|
||||||
|
|
||||||
//connect to the ptp router
|
|
||||||
router = IPlatypusRouter(_router);
|
|
||||||
|
|
||||||
require(path.length >= 2, "MixinPlatypus/PATH_LENGTH_MUST_BE_AT_LEAST_TWO");
|
|
||||||
require(
|
|
||||||
path[path.length - 1] == buyToken,
|
|
||||||
"MixinPlatypus/LAST_ELEMENT_OF_PATH_MUST_MATCH_OUTPUT_TOKEN"
|
|
||||||
);
|
|
||||||
// Grant the Platypus router an allowance to sell the first token.
|
|
||||||
path[0].approveIfBelow(address(router), sellAmount);
|
|
||||||
|
|
||||||
//keep track of the previous balance to confirm amount out
|
|
||||||
uint256 beforeBalance = buyToken.balanceOf(address(this));
|
|
||||||
|
|
||||||
(uint256 amountOut, uint256 haircut) = router.swapTokensForTokens(
|
|
||||||
// Convert to `buyToken` along this path.
|
|
||||||
_path,
|
|
||||||
// pool to swap on
|
|
||||||
_pool,
|
|
||||||
// Sell all tokens we hold.
|
|
||||||
sellAmount,
|
|
||||||
// Minimum buy amount.
|
|
||||||
0,
|
|
||||||
// Recipient is `this`.
|
|
||||||
address(this),
|
|
||||||
|
|
||||||
block.timestamp + 1
|
|
||||||
);
|
|
||||||
//calculate the buy amount from the tokens we recieved
|
|
||||||
boughtAmount = buyToken.balanceOf(address(this)).safeSub(beforeBalance);
|
|
||||||
return boughtAmount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
30
contracts/zero-ex/contracts/test/foundry/ContractTest.sol
Normal file
30
contracts/zero-ex/contracts/test/foundry/ContractTest.sol
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
|
||||||
|
import "forge-std/Test.sol";
|
||||||
|
|
||||||
|
contract ContractTest is Test {
|
||||||
|
function setUp() public {}
|
||||||
|
|
||||||
|
function testExample() public {
|
||||||
|
assertTrue(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "src/features/OtcOrdersFeature.sol";
|
||||||
|
import "src/features/TransformERC20Feature.sol";
|
||||||
|
import "src/features/UniswapFeature.sol";
|
||||||
|
import "src/features/UniswapV3Feature.sol";
|
||||||
|
import "@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol";
|
||||||
|
import "../utils/DeployZeroEx.sol";
|
||||||
|
|
||||||
|
contract Architecture is DeployZeroEx {
|
||||||
|
|
||||||
|
function testFeatureDeployment()
|
||||||
|
public
|
||||||
|
{
|
||||||
|
deployZeroEx();
|
||||||
|
// If we look up the address of the Uniswap Implementation, it will be empty
|
||||||
|
// as it hasn't yet been registered.
|
||||||
|
emit log_named_address("sellToUniswap implementation", ZERO_EX.getFunctionImplementation(UniswapFeature.sellToUniswap.selector));
|
||||||
|
// Try registering the implementation
|
||||||
|
// Technically the constructor argument is the WETH address, which doesn't yet exist in this environment
|
||||||
|
UniswapFeature uniswapFeature = new UniswapFeature(IEtherTokenV06(address(0)));
|
||||||
|
emit log_named_address("UniswapFeature deployed at", address(uniswapFeature));
|
||||||
|
// As part of the migration, the UniswapFeature registers its own selectors
|
||||||
|
IZERO_EX.migrate(address(uniswapFeature), abi.encodePacked(uniswapFeature.migrate.selector), address(this));
|
||||||
|
// You will observe in the logs the following events
|
||||||
|
// ├─ emit ProxyFunctionUpdated(selector: 0xd9627aa4, oldImpl: 0x0000000000000000000000000000000000000000, newImpl: UniswapFeature: [0xf5a2fe45f4f1308502b1c136b9ef8af136141382])
|
||||||
|
// sellToUniswap(address[],uint256,uint256,bool) = 0xd9627aa4
|
||||||
|
// cast keccak 'sellToUniswap(address[],uint256,uint256,bool)'
|
||||||
|
// > 0xd9627aa4...
|
||||||
|
emit log_named_address("sellToUniswap implementation", ZERO_EX.getFunctionImplementation(UniswapFeature.sellToUniswap.selector));
|
||||||
|
// From now on it will be possible to call 0xEP.sellToUniswap which will be registered.
|
||||||
|
|
||||||
|
// Try deploying another Feature such as
|
||||||
|
|
||||||
|
// OtcOrdersFeature
|
||||||
|
// ...
|
||||||
|
emit log_named_address("fillOtcOrder implementation", ZERO_EX.getFunctionImplementation(OtcOrdersFeature.fillOtcOrder.selector));
|
||||||
|
|
||||||
|
// UniswapV3Feature
|
||||||
|
// ...
|
||||||
|
emit log_named_address("sellTokenForTokenToUniswapV3 implementation", ZERO_EX.getFunctionImplementation(UniswapV3Feature.sellTokenForTokenToUniswapV3.selector));
|
||||||
|
|
||||||
|
// Or for extra credit, the TransformERC20Feature
|
||||||
|
emit log_named_address("transformERC20 implementation", ZERO_EX.getFunctionImplementation(TransformERC20Feature.transformERC20.selector));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "forge-std/Test.sol";
|
||||||
|
|
||||||
|
interface LanguageContract {
|
||||||
|
function hello()
|
||||||
|
external
|
||||||
|
returns (address, string memory);
|
||||||
|
}
|
||||||
|
|
||||||
|
contract ContractA is LanguageContract {
|
||||||
|
function hello()
|
||||||
|
public
|
||||||
|
override
|
||||||
|
returns (address, string memory)
|
||||||
|
{
|
||||||
|
return (address(this), "Why hello there!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract ContractB is LanguageContract {
|
||||||
|
function hello()
|
||||||
|
public
|
||||||
|
override
|
||||||
|
returns (address, string memory)
|
||||||
|
{
|
||||||
|
return (address(this), "Protocol Academy was here");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract DelegateCaller {
|
||||||
|
function delegateCall(address impl)
|
||||||
|
public
|
||||||
|
returns (address addr, string memory str)
|
||||||
|
{
|
||||||
|
(bool success, bytes memory resultData) = impl.delegatecall(abi.encodePacked(LanguageContract.hello.selector));
|
||||||
|
(addr, str) = abi.decode(resultData, (address, string));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract DelegateCall is Test {
|
||||||
|
LanguageContract A;
|
||||||
|
LanguageContract B;
|
||||||
|
DelegateCaller caller;
|
||||||
|
|
||||||
|
function setUp()
|
||||||
|
public
|
||||||
|
{
|
||||||
|
A = new ContractA();
|
||||||
|
B = new ContractB();
|
||||||
|
caller = new DelegateCaller();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function testDelegateCall()
|
||||||
|
public
|
||||||
|
returns (uint256 val)
|
||||||
|
{
|
||||||
|
// ← DelegateCaller: [0xefc56627233b02ea95bae7e19f648d7dcd5bb132], "Why hello there!"
|
||||||
|
caller.delegateCall(address(A));
|
||||||
|
|
||||||
|
// ← DelegateCaller: [0xefc56627233b02ea95bae7e19f648d7dcd5bb132], "Protocol Academy was here"
|
||||||
|
caller.delegateCall(address(B));
|
||||||
|
|
||||||
|
// Note how in the above results the context is always the DelegateCaller context
|
||||||
|
// with address 0xefc56627233b02ea95bae7e19f648d7dcd5bb132
|
||||||
|
|
||||||
|
// ← ContractA: [0xce71065d4017f316ec606fe4422e11eb2c47c246], "Why hello there!"
|
||||||
|
A.hello();
|
||||||
|
|
||||||
|
// ← ContractB: [0x185a4dc360ce69bdccee33b3784b0282f7961aea], "Protocol Academy was here"
|
||||||
|
B.hello();
|
||||||
|
|
||||||
|
// Note how in the above results the context is each individual contract
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "forge-std/Test.sol";
|
||||||
|
|
||||||
|
import "src/IZeroEx.sol";
|
||||||
|
import "src/ZeroEx.sol";
|
||||||
|
import "src/migrations/InitialMigration.sol";
|
||||||
|
import "src/features/OtcOrdersFeature.sol";
|
||||||
|
import "src/features/OwnableFeature.sol";
|
||||||
|
import "src/features/SimpleFunctionRegistryFeature.sol";
|
||||||
|
import "src/features/TransformERC20Feature.sol";
|
||||||
|
import "src/features/UniswapFeature.sol";
|
||||||
|
import "src/features/UniswapV3Feature.sol";
|
||||||
|
import "@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol";
|
||||||
|
|
||||||
|
contract StorageContract {
|
||||||
|
uint256 public storedValue = 0;
|
||||||
|
|
||||||
|
function increase()
|
||||||
|
public
|
||||||
|
returns (uint256)
|
||||||
|
{
|
||||||
|
storedValue++;
|
||||||
|
return storedValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract OpcodeCosts is Test {
|
||||||
|
|
||||||
|
uint256 public storedValue = 0;
|
||||||
|
StorageContract store;
|
||||||
|
|
||||||
|
function setUp()
|
||||||
|
public
|
||||||
|
{
|
||||||
|
store = new StorageContract();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function testLoadFromStorage()
|
||||||
|
public
|
||||||
|
returns (uint256 val)
|
||||||
|
{
|
||||||
|
// [2306] StorageContract::storedValue() [staticcall]
|
||||||
|
val = store.storedValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testLoadAndStore()
|
||||||
|
public
|
||||||
|
returns (uint256 val)
|
||||||
|
{
|
||||||
|
// [22346] StorageContract::increase()
|
||||||
|
val = store.increase();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "forge-std/Test.sol";
|
||||||
|
|
||||||
|
import "src/IZeroEx.sol";
|
||||||
|
import "src/ZeroEx.sol";
|
||||||
|
import "src/features/interfaces/IFeature.sol";
|
||||||
|
import "src/features/TransformERC20Feature.sol";
|
||||||
|
import "../utils/TestUtils.sol";
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: Try running this test on various networks
|
||||||
|
// forge test --match-contract DeployedFeatures --fork-url <rpc_url> -vvv
|
||||||
|
contract DeployedFeatures is TestUtils {
|
||||||
|
ZeroEx public ZERO_EX = ZeroEx(0xDef1C0ded9bec7F1a1670819833240f027b25EfF);
|
||||||
|
IZeroEx public IZERO_EX = IZeroEx(0xDef1C0ded9bec7F1a1670819833240f027b25EfF);
|
||||||
|
|
||||||
|
function testLookupFunction()
|
||||||
|
public
|
||||||
|
{
|
||||||
|
uint256 chainId;
|
||||||
|
assembly { chainId := chainid() }
|
||||||
|
// Skip if not in forking mode
|
||||||
|
if (chainId == 31337) {
|
||||||
|
emit log_string("Not in forking mode; skipping test");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: try swapping out this selector
|
||||||
|
bytes4 selector = TransformERC20Feature.transformERC20.selector;
|
||||||
|
address impl = ZERO_EX.getFunctionImplementation(selector);
|
||||||
|
if (impl == address(0)) {
|
||||||
|
emit log_named_address("v0.0.0", impl);
|
||||||
|
} else {
|
||||||
|
uint256 version = IFeature(impl).FEATURE_VERSION();
|
||||||
|
// NOTE: we used to have a bug where the version was
|
||||||
|
// being incorrectly encoded as 0 lol
|
||||||
|
emit log_named_address(_versionString(version), impl);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint256 rollbackLength = IZERO_EX.getRollbackLength(selector);
|
||||||
|
if (rollbackLength > 1) {
|
||||||
|
for (uint256 i = rollbackLength - 1; i > 0; i--) {
|
||||||
|
address prevImpl = IZERO_EX.getRollbackEntryAtIndex(selector, i);
|
||||||
|
if (prevImpl == address(0)) {
|
||||||
|
emit log_named_address("v0.0.0", prevImpl);
|
||||||
|
} else {
|
||||||
|
uint256 version = IFeature(prevImpl).FEATURE_VERSION();
|
||||||
|
emit log_named_address(_versionString(version), prevImpl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _versionString(uint256 encodedVersion)
|
||||||
|
private
|
||||||
|
pure
|
||||||
|
returns (string memory versionString)
|
||||||
|
{
|
||||||
|
uint32 major = uint32(encodedVersion >> 64);
|
||||||
|
uint32 minor = uint32(encodedVersion >> 32);
|
||||||
|
uint32 revision = uint32(encodedVersion);
|
||||||
|
|
||||||
|
return string(abi.encodePacked(
|
||||||
|
"v",
|
||||||
|
_toString(uint256(major)),
|
||||||
|
".",
|
||||||
|
_toString(uint256(minor)),
|
||||||
|
".",
|
||||||
|
_toString(uint256(revision))
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "src/fixins/FixinCommon.sol";
|
||||||
|
import "src/migrations/LibMigrate.sol";
|
||||||
|
import "../utils/DeployZeroEx.sol";
|
||||||
|
|
||||||
|
contract FibonacciFeature is FixinCommon {
|
||||||
|
uint256 private prevFib;
|
||||||
|
uint256 private fib;
|
||||||
|
|
||||||
|
function migrate()
|
||||||
|
external
|
||||||
|
returns (bytes4 success)
|
||||||
|
{
|
||||||
|
_registerFeatureFunction(this.stepFibonacci.selector);
|
||||||
|
_registerFeatureFunction(this.currentFibonacci.selector);
|
||||||
|
return LibMigrate.MIGRATE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
function stepFibonacci() external {
|
||||||
|
if (prevFib == 0 && fib == 0) {
|
||||||
|
fib = 1;
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
uint256 nextFib = prevFib + fib;
|
||||||
|
prevFib = fib;
|
||||||
|
fib = nextFib;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function currentFibonacci() external view returns (uint256) {
|
||||||
|
return fib;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract VoteFeature is FixinCommon {
|
||||||
|
uint256 private good;
|
||||||
|
uint256 private bad;
|
||||||
|
mapping (address => bool) hasVoted;
|
||||||
|
|
||||||
|
function migrate()
|
||||||
|
external
|
||||||
|
returns (bytes4 success)
|
||||||
|
{
|
||||||
|
_registerFeatureFunction(this.pineappleOnPizzaIsGood.selector);
|
||||||
|
_registerFeatureFunction(this.pineappleOnPizzaIsBad.selector);
|
||||||
|
_registerFeatureFunction(this.currentVotes.selector);
|
||||||
|
return LibMigrate.MIGRATE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
function pineappleOnPizzaIsGood() external {
|
||||||
|
require(!hasVoted[msg.sender]);
|
||||||
|
hasVoted[msg.sender] = true;
|
||||||
|
good++;
|
||||||
|
}
|
||||||
|
|
||||||
|
function pineappleOnPizzaIsBad() external {
|
||||||
|
require(!hasVoted[msg.sender]);
|
||||||
|
hasVoted[msg.sender] = true;
|
||||||
|
bad++;
|
||||||
|
}
|
||||||
|
|
||||||
|
function currentVotes() external view returns (uint256, uint256) {
|
||||||
|
return (good, bad);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract FeatureStorage is DeployZeroEx {
|
||||||
|
|
||||||
|
function setUp() public {
|
||||||
|
deployZeroEx();
|
||||||
|
FibonacciFeature fibonacciFeature = new FibonacciFeature();
|
||||||
|
emit log_named_address("FibonacciFeature deployed at", address(fibonacciFeature));
|
||||||
|
IZERO_EX.migrate(address(fibonacciFeature), abi.encodePacked(fibonacciFeature.migrate.selector), address(this));
|
||||||
|
emit log_named_address("stepFibonacci implementation", ZERO_EX.getFunctionImplementation(FibonacciFeature.stepFibonacci.selector));
|
||||||
|
|
||||||
|
VoteFeature voteFeature = new VoteFeature();
|
||||||
|
emit log_named_address("VoteFeature deployed at", address(voteFeature));
|
||||||
|
IZERO_EX.migrate(address(voteFeature), abi.encodePacked(voteFeature.migrate.selector), address(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
function testFeatureStorage()
|
||||||
|
public
|
||||||
|
{
|
||||||
|
for (uint256 i = 0; i < 10; i++) {
|
||||||
|
emit log_named_uint("fib", FibonacciFeature(address(ZERO_EX)).currentFibonacci());
|
||||||
|
FibonacciFeature(address(ZERO_EX)).stepFibonacci();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint256 i = 0; i < 10; i++) {
|
||||||
|
address voter = _pseudoRandomAddress(i);
|
||||||
|
bool likesPineappleOnPizza = (uint160(voter) % 2) == 1;
|
||||||
|
hoax(voter);
|
||||||
|
likesPineappleOnPizza
|
||||||
|
? VoteFeature(address(ZERO_EX)).pineappleOnPizzaIsGood()
|
||||||
|
: VoteFeature(address(ZERO_EX)).pineappleOnPizzaIsBad();
|
||||||
|
}
|
||||||
|
(uint256 good, uint256 bad) = VoteFeature(address(ZERO_EX)).currentVotes();
|
||||||
|
|
||||||
|
emit log_named_uint("good votes", good);
|
||||||
|
emit log_named_uint("bad votes", bad);
|
||||||
|
emit log_named_uint("fib", FibonacciFeature(address(ZERO_EX)).currentFibonacci());
|
||||||
|
|
||||||
|
// TODO: Fix the Fibonacci and Vote features so that their respective storage
|
||||||
|
// variables do not collide. Create LibFibonacciStorage and LibVoteStorage
|
||||||
|
// to do so.
|
||||||
|
}
|
||||||
|
|
||||||
|
function _pseudoRandomAddress(uint256 seed) private pure returns (address) {
|
||||||
|
return address(uint160(uint256(keccak256(abi.encodePacked(seed)))));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "src/fixins/FixinCommon.sol";
|
||||||
|
import "src/migrations/LibMigrate.sol";
|
||||||
|
import "../utils/DeployZeroEx.sol";
|
||||||
|
|
||||||
|
contract ZooFeature is FixinCommon {
|
||||||
|
event Meow();
|
||||||
|
event Woof();
|
||||||
|
event SlothNoises();
|
||||||
|
|
||||||
|
function migrate()
|
||||||
|
external
|
||||||
|
returns (bytes4 success)
|
||||||
|
{
|
||||||
|
_registerFeatureFunction(this.cat.selector);
|
||||||
|
_registerFeatureFunction(this.dog.selector);
|
||||||
|
_registerFeatureFunction(this.sloth.selector);
|
||||||
|
return LibMigrate.MIGRATE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
function cat() external {
|
||||||
|
emit Meow();
|
||||||
|
}
|
||||||
|
function dog() external {
|
||||||
|
emit Woof();
|
||||||
|
}
|
||||||
|
function sloth() external {
|
||||||
|
emit SlothNoises();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract ZooFeatureV2 is FixinCommon {
|
||||||
|
event Meow();
|
||||||
|
event Purr();
|
||||||
|
event Woof();
|
||||||
|
event CapybaraNoises();
|
||||||
|
|
||||||
|
function migrate()
|
||||||
|
external
|
||||||
|
returns (bytes4 success)
|
||||||
|
{
|
||||||
|
_registerFeatureFunction(this.cat.selector);
|
||||||
|
_registerFeatureFunction(this.dog.selector);
|
||||||
|
_registerFeatureFunction(this.capybara.selector);
|
||||||
|
return LibMigrate.MIGRATE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: the function signature for `cat` has changed, so the selectors are different!
|
||||||
|
function cat(bool happy) external {
|
||||||
|
if (happy) {
|
||||||
|
emit Purr();
|
||||||
|
} else {
|
||||||
|
emit Meow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// dog is the same
|
||||||
|
function dog() external {
|
||||||
|
emit Woof();
|
||||||
|
}
|
||||||
|
// new!
|
||||||
|
function capybara() external {
|
||||||
|
emit CapybaraNoises();
|
||||||
|
}
|
||||||
|
// sloth is not in V2
|
||||||
|
}
|
||||||
|
|
||||||
|
contract Migration is DeployZeroEx {
|
||||||
|
|
||||||
|
function setUp() public {
|
||||||
|
deployZeroEx();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testMigration()
|
||||||
|
public
|
||||||
|
{
|
||||||
|
ZooFeature zooFeature = new ZooFeature();
|
||||||
|
IZERO_EX.migrate(address(zooFeature), abi.encodePacked(zooFeature.migrate.selector), address(this));
|
||||||
|
|
||||||
|
// The functions in ZooFeature are now registered in the exchange proxy!
|
||||||
|
// Try them out.
|
||||||
|
ZooFeature(address(ZERO_EX)).dog();
|
||||||
|
ZooFeature(address(ZERO_EX)).cat();
|
||||||
|
ZooFeature(address(ZERO_EX)).sloth();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testUpgrade()
|
||||||
|
public
|
||||||
|
{
|
||||||
|
// Original version
|
||||||
|
ZooFeature zooFeature = new ZooFeature();
|
||||||
|
IZERO_EX.migrate(address(zooFeature), abi.encodePacked(zooFeature.migrate.selector), address(this));
|
||||||
|
// Upgrade
|
||||||
|
ZooFeatureV2 zooFeatureV2 = new ZooFeatureV2();
|
||||||
|
IZERO_EX.migrate(address(zooFeatureV2), abi.encodePacked(zooFeatureV2.migrate.selector), address(this));
|
||||||
|
|
||||||
|
// The functions in ZooFeatureV2 are now registered in the exchange proxy!
|
||||||
|
// Try them out.
|
||||||
|
ZooFeatureV2(address(ZERO_EX)).dog();
|
||||||
|
ZooFeatureV2(address(ZERO_EX)).cat(true);
|
||||||
|
ZooFeatureV2(address(ZERO_EX)).cat(false);
|
||||||
|
ZooFeatureV2(address(ZERO_EX)).capybara();
|
||||||
|
|
||||||
|
// `sloth` is still registered
|
||||||
|
ZooFeature(address(ZERO_EX)).sloth();
|
||||||
|
// The old `cat` function is still registered, since it has a different selector
|
||||||
|
emit log_named_bytes('cat()', abi.encodePacked(zooFeature.cat.selector));
|
||||||
|
emit log_named_bytes('cat(bool)', abi.encodePacked(zooFeatureV2.cat.selector));
|
||||||
|
ZooFeature(address(ZERO_EX)).cat();
|
||||||
|
|
||||||
|
// Let's deregister the sloth and old cat functions
|
||||||
|
IZERO_EX.rollback(zooFeature.cat.selector, address(0));
|
||||||
|
IZERO_EX.rollback(zooFeature.sloth.selector, address(0));
|
||||||
|
|
||||||
|
// Now trying to call the old cat or sloth reverts
|
||||||
|
try ZooFeature(address(ZERO_EX)).cat() {}
|
||||||
|
catch (bytes memory e) {
|
||||||
|
emit log_string("cat() reverted");
|
||||||
|
}
|
||||||
|
try ZooFeature(address(ZERO_EX)).sloth() {}
|
||||||
|
catch (bytes memory e) {
|
||||||
|
emit log_string("sloth() reverted");
|
||||||
|
}
|
||||||
|
|
||||||
|
// dog() was upgraded, so it's v1 address is in the `implHistory`
|
||||||
|
emit log_named_uint(
|
||||||
|
"dog() rollback length",
|
||||||
|
IZERO_EX.getRollbackLength(zooFeature.dog.selector)
|
||||||
|
);
|
||||||
|
emit log_named_address(
|
||||||
|
"dog() v1 is in the history",
|
||||||
|
IZERO_EX.getRollbackEntryAtIndex(zooFeature.dog.selector, 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "../utils/ForkUtils.sol";
|
||||||
|
import "../utils/TestUtils.sol";
|
||||||
|
import "src/IZeroEx.sol";
|
||||||
|
import "@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol";
|
||||||
|
import "src/features/TransformERC20Feature.sol";
|
||||||
|
import "src/external/TransformerDeployer.sol";
|
||||||
|
import "src/transformers/WethTransformer.sol";
|
||||||
|
import "src/transformers/FillQuoteTransformer.sol";
|
||||||
|
import "src/transformers/bridges/BridgeProtocols.sol";
|
||||||
|
import "src/transformers/bridges/BridgeAdapter.sol";
|
||||||
|
|
||||||
|
/*
|
||||||
|
This test must be run in forked mode
|
||||||
|
e.g forge test -vvvv -m 'testBasicSwap' -f ETH_RPC_URL
|
||||||
|
It is also helpful to have an Etherscan API key exported
|
||||||
|
export ETHERSCAN_API_KEY=
|
||||||
|
as Foundry will fetch source code and names
|
||||||
|
*/
|
||||||
|
|
||||||
|
contract BasicSwapForkedTest is
|
||||||
|
ForkUtils,
|
||||||
|
TestUtils
|
||||||
|
{
|
||||||
|
IZeroEx public IZERO_EX = IZeroEx(0xDef1C0ded9bec7F1a1670819833240f027b25EfF);
|
||||||
|
IEtherTokenV06 WETH = IEtherTokenV06(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
|
||||||
|
|
||||||
|
// These addresses are taken from contract-addresses for Ethereum Mainnet
|
||||||
|
TransformerDeployer transformerDeployer = TransformerDeployer(0x39dCe47a67aD34344EAB877eaE3Ef1FA2a1d50Bb);
|
||||||
|
WethTransformer wethTransformer = WethTransformer(0xb2bc06a4EfB20FC6553a69Dbfa49B7bE938034A7);
|
||||||
|
// Note this may be outdated as it is often updated
|
||||||
|
FillQuoteTransformer fillQuoteTransformer = FillQuoteTransformer(0xADBE39F2988A8Be1C1120F05e28CC888b150c8a6);
|
||||||
|
|
||||||
|
function setUp()
|
||||||
|
public
|
||||||
|
onlyForked()
|
||||||
|
{
|
||||||
|
// HACK we deploy some fake transformers just so Foundry
|
||||||
|
// can detect these contracts for decoding
|
||||||
|
new WethTransformer(IEtherTokenV06(address(0)));
|
||||||
|
vm.label(address(wethTransformer), "WethTransformer");
|
||||||
|
new FillQuoteTransformer(IBridgeAdapter(address(0)), INativeOrdersFeature(address(0)));
|
||||||
|
vm.label(address(fillQuoteTransformer), "FillQuoteTransformer");
|
||||||
|
new BridgeAdapter(IEtherTokenV06(address(0)));
|
||||||
|
vm.label(address(fillQuoteTransformer.bridgeAdapter()), "BridgeAdapter");
|
||||||
|
vm.label(address(IZERO_EX.getTransformWallet()), "FlashWallet");
|
||||||
|
}
|
||||||
|
|
||||||
|
function testBasicSwap()
|
||||||
|
public
|
||||||
|
onlyForked()
|
||||||
|
{
|
||||||
|
IERC20TokenV06 USDC = IERC20TokenV06(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
|
||||||
|
// Create our list of transformations, let's do WethTransformer and FillQuoteTransformer
|
||||||
|
ITransformERC20Feature.Transformation[] memory transformations = new ITransformERC20Feature.Transformation[](2);
|
||||||
|
// Use our cheeky search helper to find the nonce rather than hardcode it
|
||||||
|
// hint: it's 6 for WethTransformer and 22 for this FillQuoteTransformer
|
||||||
|
transformations[0].deploymentNonce = _findTransformerNonce(address(wethTransformer), address(transformerDeployer));
|
||||||
|
transformations[1].deploymentNonce = _findTransformerNonce(address(fillQuoteTransformer), address(transformerDeployer));
|
||||||
|
|
||||||
|
emit log_named_uint("WethTransformer nonce", transformations[0].deploymentNonce);
|
||||||
|
emit log_named_uint("FillQuoteTransformer nonce", transformations[1].deploymentNonce);
|
||||||
|
|
||||||
|
// Set the first transformation to transform ETH into WETH
|
||||||
|
transformations[0].data = abi.encode(LibERC20Transformer.ETH_TOKEN_ADDRESS, 1e18);
|
||||||
|
|
||||||
|
// Set up the FillQuoteTransformer data
|
||||||
|
FillQuoteTransformer.TransformData memory fqtData;
|
||||||
|
fqtData.side = FillQuoteTransformer.Side.Sell;
|
||||||
|
// FQT deals with tokens, not ETH, so it needs a WETH transformer
|
||||||
|
// to be applied beforehand
|
||||||
|
fqtData.sellToken = IERC20TokenV06(address(WETH));
|
||||||
|
fqtData.buyToken = IERC20TokenV06(address(USDC));
|
||||||
|
// the FQT has a sequence, e.g first RFQ then Limit then Bridge
|
||||||
|
// since solidity doesn't support arrays of different types, this is one simple solution
|
||||||
|
// We use a Bridge order type here as we will fill on UniswapV2
|
||||||
|
fqtData.fillSequence = new FillQuoteTransformer.OrderType[](1);
|
||||||
|
fqtData.fillSequence[0] = FillQuoteTransformer.OrderType.Bridge;
|
||||||
|
// The amount to fill
|
||||||
|
fqtData.fillAmount = 1e18;
|
||||||
|
// Now let's set up a UniswapV2 fill
|
||||||
|
fqtData.bridgeOrders = new IBridgeAdapter.BridgeOrder[](1);
|
||||||
|
IBridgeAdapter.BridgeOrder memory order;
|
||||||
|
// The ID is shifted so we can concat <PROTOCOL><NAME>
|
||||||
|
// e.g <UniswapV2Protocol><UniswapV2>
|
||||||
|
// or <UniswapV2Protocol><SushiSwap> for forks
|
||||||
|
order.source = bytes32(uint256(BridgeProtocols.UNISWAPV2) << 128);
|
||||||
|
// How much we want to fill on this order, which can be different to the total
|
||||||
|
// e.g 50/50 split this would be half
|
||||||
|
order.takerTokenAmount = 1e18;
|
||||||
|
// Set this low as the price of ETH/USDC can change
|
||||||
|
order.makerTokenAmount = 1;
|
||||||
|
// The data needed specifically for the source to fill,
|
||||||
|
// e.g for UniswapV2 it is the router contract and a path. See MixinUniswapV2
|
||||||
|
address[] memory uniPath = new address[](2);
|
||||||
|
uniPath[0] = address(WETH);
|
||||||
|
uniPath[1] = address(USDC);
|
||||||
|
order.bridgeData = abi.encode(address(0xf164fC0Ec4E93095b804a4795bBe1e041497b92a), uniPath);
|
||||||
|
fqtData.bridgeOrders[0] = order;
|
||||||
|
// Now encode the FQT data into the transformation
|
||||||
|
transformations[1].data = abi.encode(fqtData);
|
||||||
|
|
||||||
|
|
||||||
|
// Now let's do it!
|
||||||
|
// Give ourselves 1e18 ETH
|
||||||
|
vm.deal(address(this), 1e18);
|
||||||
|
IZERO_EX.transformERC20{value: 1e18}(
|
||||||
|
// input token
|
||||||
|
IERC20TokenV06(LibERC20Transformer.ETH_TOKEN_ADDRESS),
|
||||||
|
// output token
|
||||||
|
IERC20TokenV06(address(USDC)),
|
||||||
|
// input token amount
|
||||||
|
1e18,
|
||||||
|
// min output token amount, set this low as ETH/USDC price will move
|
||||||
|
1,
|
||||||
|
// list of transform
|
||||||
|
transformations
|
||||||
|
);
|
||||||
|
// Hoollly heck we bought some USDC
|
||||||
|
assertGt(USDC.balanceOf(address(this)), 0);
|
||||||
|
emit log_named_uint("USDC bought", USDC.balanceOf(address(this)));
|
||||||
|
|
||||||
|
/*
|
||||||
|
Homework
|
||||||
|
Try the following:
|
||||||
|
* make this UniswapV2 trade go ETH->DAI->USDC
|
||||||
|
* combine multiple trades, e.g Uniswap V2 ETH->USDC and ETH->DAI->USDC
|
||||||
|
* create a UniswapV3 trade
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "../utils/DeployZeroEx.sol";
|
||||||
|
import "@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol";
|
||||||
|
import "src/features/TransformERC20Feature.sol";
|
||||||
|
import "src/external/TransformerDeployer.sol";
|
||||||
|
import "src/transformers/WethTransformer.sol";
|
||||||
|
import "src/transformers/FillQuoteTransformer.sol";
|
||||||
|
|
||||||
|
import "@0x/contracts-erc20/contracts/src/v06/WETH9.sol";
|
||||||
|
|
||||||
|
contract TransformERC20FeatureTest is DeployZeroEx {
|
||||||
|
IEtherTokenV06 WETH;
|
||||||
|
|
||||||
|
TransformerDeployer transformerDeployer;
|
||||||
|
WethTransformer wethTransformer;
|
||||||
|
TransformERC20Feature transformERC20Feature;
|
||||||
|
|
||||||
|
function setUp() public {
|
||||||
|
deployZeroEx();
|
||||||
|
// Deploy from bytecode as this is Solidity v5
|
||||||
|
WETH = IEtherTokenV06(deployCode("foundry-artifacts/WETH9.sol/WETH9.json"));
|
||||||
|
emit log_named_address("WETH deployed at", address(WETH));
|
||||||
|
}
|
||||||
|
|
||||||
|
function testMigration()
|
||||||
|
public
|
||||||
|
{
|
||||||
|
// Note there is a lot here, so feel free to comment out further sections
|
||||||
|
// so you can read the logs and traces
|
||||||
|
|
||||||
|
/*
|
||||||
|
Deploy TransformERC20Feature
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Create a new TransformerDeployer, which will deploy all future transformers
|
||||||
|
// Owners are typically EOA which are allowed to deploy
|
||||||
|
// For this we will use this current contract address
|
||||||
|
address[] memory owners = new address[](1);
|
||||||
|
owners[0] = address(this);
|
||||||
|
transformerDeployer = new TransformerDeployer(owners);
|
||||||
|
emit log_named_address("TransformerDeployer deployed at", address(transformerDeployer));
|
||||||
|
|
||||||
|
|
||||||
|
transformERC20Feature = new TransformERC20Feature();
|
||||||
|
emit log_named_address("TransformERC20Feature deployed at", address(transformERC20Feature));
|
||||||
|
|
||||||
|
// Migrate 0x EP and initialize the TransformERC20Feature
|
||||||
|
// Remember this performs a delegatecall and registers function selectors
|
||||||
|
// function migrate(address target, bytes calldata data, address newOwner)
|
||||||
|
IZERO_EX.migrate(
|
||||||
|
address(transformERC20Feature),
|
||||||
|
// Use encodeWithSelector to generate low level call data with the required arguments
|
||||||
|
// <function selector><arg1>
|
||||||
|
// The required migration function to call is the following:
|
||||||
|
// function migrate(address transformerDeployer)
|
||||||
|
// e.g ce5494bb00000000000000000000000042997ac9251e5bb0a61f4ff790e5b991ea07fd9b
|
||||||
|
// try: cast calldata 'migrate(address)' '0x42997ac9251e5bb0a61f4ff790e5b991ea07fd9b'
|
||||||
|
abi.encodeWithSelector(transformERC20Feature.migrate.selector, address(transformerDeployer)),
|
||||||
|
address(this)
|
||||||
|
);
|
||||||
|
|
||||||
|
// As part of the migration process a FlashWallet was generated inside of the 0x EP context
|
||||||
|
emit log_named_address("FlashWallet deployed at", address(IZERO_EX.getTransformWallet()));
|
||||||
|
// Homework: Recall why transformERC20Feature.getTransformWallet() returns address(0)
|
||||||
|
|
||||||
|
/*
|
||||||
|
Deploy a WETH transformer
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Typically the code to deployed is passed in off-chain, so we will emulate something similar
|
||||||
|
// by using vm.getCode cheatcode.
|
||||||
|
wethTransformer = WethTransformer(transformerDeployer.deploy(
|
||||||
|
abi.encodePacked(
|
||||||
|
// Deploy the WethTransformer code
|
||||||
|
vm.getCode("foundry-artifacts/WethTransformer.sol/WethTransformer.json"),
|
||||||
|
// WethTransformer takes WETH address as a constructor argument
|
||||||
|
abi.encode(address(WETH))
|
||||||
|
)
|
||||||
|
));
|
||||||
|
assertEq(address(wethTransformer.weth()), address(WETH));
|
||||||
|
emit log_named_address("WethTransformer deployed at", address(IZERO_EX.getTransformWallet()));
|
||||||
|
|
||||||
|
// Not much we can do with just a WethTransformer, I guess we could go ETH->WETH with it
|
||||||
|
// Cheat code to give this contract 1e18 ETH
|
||||||
|
vm.deal(address(this), 1e18);
|
||||||
|
|
||||||
|
// Deployment nonce is 1 as it is the first contract TransformerDeployer deployed
|
||||||
|
// let's assert that is true
|
||||||
|
assertEq(
|
||||||
|
LibERC20Transformer.getDeployedAddress(address(transformerDeployer), 1),
|
||||||
|
address(wethTransformer)
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Perform a ETH->WETH transformation
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Create our list of transformations, this will just have a WethTransformer
|
||||||
|
ITransformERC20Feature.Transformation[] memory transformations = new ITransformERC20Feature.Transformation[](1);
|
||||||
|
transformations[0].deploymentNonce = 1;
|
||||||
|
transformations[0].data = abi.encode(LibERC20Transformer.ETH_TOKEN_ADDRESS, 1e18);
|
||||||
|
|
||||||
|
IZERO_EX.transformERC20{value: 1e18}(
|
||||||
|
// input token
|
||||||
|
IERC20TokenV06(LibERC20Transformer.ETH_TOKEN_ADDRESS),
|
||||||
|
// output token
|
||||||
|
IERC20TokenV06(address(WETH)),
|
||||||
|
// input token amount
|
||||||
|
1e18,
|
||||||
|
// min output token amount
|
||||||
|
1e18,
|
||||||
|
// list of transform
|
||||||
|
transformations
|
||||||
|
);
|
||||||
|
assertEq(WETH.balanceOf(address(this)), 1e18);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Perform a WETH->ETH transformation
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Let's go backwards, remember we need to set the approval of WETH to the 0x EP
|
||||||
|
WETH.approve(address(IZERO_EX), uint256(-1));
|
||||||
|
// Override the data in the previous transformation
|
||||||
|
transformations[0].data = abi.encode(address(WETH), 1e18);
|
||||||
|
// Note: No { value } here as it's a token
|
||||||
|
IZERO_EX.transformERC20(
|
||||||
|
// input token
|
||||||
|
IERC20TokenV06(address(WETH)),
|
||||||
|
// output token
|
||||||
|
IERC20TokenV06(LibERC20Transformer.ETH_TOKEN_ADDRESS),
|
||||||
|
// input token amount
|
||||||
|
1e18,
|
||||||
|
// min output token amount
|
||||||
|
1e18,
|
||||||
|
// list of transform
|
||||||
|
transformations
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Deploy FillQuoteTransformer and BridgeAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
// At this time I would show how to do a ETH->USDC trade
|
||||||
|
// but we need to set up more of the world, or to run in forked mode
|
||||||
|
// with an AMM (find this in BasicSwapForked.t.sol)
|
||||||
|
|
||||||
|
// Instead let's just deploy the FQT and BridgeAdapter and as homework
|
||||||
|
// you might explore running in forked mode and using transformations
|
||||||
|
address bridgeAdapter = deployCode("foundry-artifacts/BridgeAdapter.sol/BridgeAdapter.json", abi.encode(address(WETH)));
|
||||||
|
FillQuoteTransformer fillQuoteTransformer = FillQuoteTransformer(transformerDeployer.deploy(
|
||||||
|
abi.encodePacked(
|
||||||
|
// Deploy the FillQuoteTransformer code
|
||||||
|
vm.getCode("foundry-artifacts/FillQuoteTransformer.sol/FillQuoteTransformer.json"),
|
||||||
|
// FillQuoteTransformer takes the BridgeAdapter and ZeroEx address as arguments
|
||||||
|
abi.encode(bridgeAdapter, address(ZERO_EX))
|
||||||
|
)
|
||||||
|
));
|
||||||
|
assertEq(address(fillQuoteTransformer.bridgeAdapter()), bridgeAdapter);
|
||||||
|
assertEq(
|
||||||
|
LibERC20Transformer.getDeployedAddress(address(transformerDeployer), 2),
|
||||||
|
address(fillQuoteTransformer)
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note this is needed as the test is a contract, and to receive ETH
|
||||||
|
// it needs to declare a receive function as per the Solidity requirements
|
||||||
|
receive() external payable {}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
contract Receiver {
|
||||||
|
function receivePure() public pure {
|
||||||
|
1 + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function receiveImpure() public {
|
||||||
|
1 + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract Empty {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
contract Call {
|
||||||
|
address empty = address(new Empty());
|
||||||
|
address receiver = address(new Receiver());
|
||||||
|
|
||||||
|
function callUnknown() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Call.t.sol --sig 'callUnknown()' --tc Call
|
||||||
|
|
||||||
|
// Why didn't this contract make a call out to 0x222... ?
|
||||||
|
// Did solidity add a check for us?
|
||||||
|
Receiver(0x2222222222222222222222222222222222222222).receiveImpure();
|
||||||
|
}
|
||||||
|
|
||||||
|
function callEmpty() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Call.t.sol --sig 'callEmpty()' --tc Call
|
||||||
|
|
||||||
|
// Observe how the added Solidity checks "pass"
|
||||||
|
// and ultimately how this results in a REVERT
|
||||||
|
Receiver(empty).receiveImpure();
|
||||||
|
}
|
||||||
|
|
||||||
|
function callEmptyRaw() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Call.t.sol --sig 'callEmptyRaw()' --tc Call
|
||||||
|
|
||||||
|
// Observe this low level call and how it differs from the above
|
||||||
|
// example. Does it revert?
|
||||||
|
empty.call(abi.encodeWithSelector(Receiver.receiveImpure.selector));
|
||||||
|
}
|
||||||
|
|
||||||
|
function callEmptyEOA() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Call.t.sol --sig 'callEmptyEOA()' --tc Call
|
||||||
|
|
||||||
|
// Observe this low level call and how it differs from the above
|
||||||
|
// example. Does it revert?
|
||||||
|
address(msg.sender).call(abi.encodeWithSelector(Receiver.receiveImpure.selector));
|
||||||
|
}
|
||||||
|
|
||||||
|
function callReceiverImpure() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Call.t.sol --sig 'callReceiverImpure()' --tc Call
|
||||||
|
|
||||||
|
// Observe how a CALL is set up and then ultimately made
|
||||||
|
// and any checks prior to making the CALL
|
||||||
|
Receiver(receiver).receiveImpure();
|
||||||
|
}
|
||||||
|
|
||||||
|
function callReceiverPure() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Call.t.sol --sig 'callReceiverPure()' --tc Call
|
||||||
|
|
||||||
|
// Did you notice the different CALL type solidity chose here ?
|
||||||
|
Receiver(receiver).receivePure();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
contract Counter {
|
||||||
|
uint256 private data = 1337;
|
||||||
|
|
||||||
|
function increment(uint256 val) public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Counter.t.sol --sig 'increment(uint256)' 10
|
||||||
|
data += val;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
contract Hash {
|
||||||
|
bytes data = hex"42";
|
||||||
|
|
||||||
|
function sha3() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Hash.sol --sig 'sha3()'
|
||||||
|
|
||||||
|
// Follow the opcodes:
|
||||||
|
// how does the data get loaded
|
||||||
|
// which one is keccak256
|
||||||
|
keccak256(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sha2() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Hash.sol --sig 'sha2()'
|
||||||
|
|
||||||
|
// Follow the opcodes:
|
||||||
|
// why is sha256 so different from keccak256
|
||||||
|
sha256(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
contract Memory {
|
||||||
|
|
||||||
|
function expand() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Memory.t.sol --sig 'expand()'
|
||||||
|
|
||||||
|
// Observe the free memory pointer increase
|
||||||
|
// when more memory is allocated
|
||||||
|
bytes32[3] memory data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function mstore() public {
|
||||||
|
// forge debug contracts/test/foundry/protocol-academy/8-evm/Memory.t.sol --sig 'mstore()'
|
||||||
|
|
||||||
|
// Observe the free memory pointer increase
|
||||||
|
// when more memory is allocated
|
||||||
|
bytes1[4] memory data;
|
||||||
|
// Observe each value being set in the memory
|
||||||
|
// slots
|
||||||
|
data[1] = 0x42;
|
||||||
|
data[0] = 0x0a;
|
||||||
|
data[2] = 0xff;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "forge-std/Test.sol";
|
||||||
|
|
||||||
|
import "src/IZeroEx.sol";
|
||||||
|
import "src/ZeroEx.sol";
|
||||||
|
import "src/migrations/InitialMigration.sol";
|
||||||
|
import "src/features/OwnableFeature.sol";
|
||||||
|
import "src/features/SimpleFunctionRegistryFeature.sol";
|
||||||
|
|
||||||
|
|
||||||
|
contract DeployZeroEx is Test {
|
||||||
|
ZeroEx public ZERO_EX = ZeroEx(0xDef1C0ded9bec7F1a1670819833240f027b25EfF);
|
||||||
|
IZeroEx public IZERO_EX = IZeroEx(0xDef1C0ded9bec7F1a1670819833240f027b25EfF);
|
||||||
|
|
||||||
|
function deployZeroEx()
|
||||||
|
internal
|
||||||
|
{
|
||||||
|
// HERE BE DRAGONS, feel free to ignore this for now
|
||||||
|
// We want to deploy the ZeroEx contract, at 0xDef1C0ded9bec7F1a1670819833240f027b25EfF
|
||||||
|
|
||||||
|
// We use a special mechanism to deploy the ZeroEx contract.
|
||||||
|
InitialMigration initialMigration = InitialMigration(deployCode(
|
||||||
|
"foundry-artifacts/InitialMigration.sol/InitialMigration.json",
|
||||||
|
abi.encode(address(this))
|
||||||
|
));
|
||||||
|
// Must occur from this address as the first transaction
|
||||||
|
hoax(0xe750ad66DE350F8110E305fb78Ec6A9f594445E3);
|
||||||
|
// Special Deployer code
|
||||||
|
bytes memory deployerBytecode = hex"608060405234801561001057600080fd5b506040516103da3803806103da83398101604081905261002f91610077565b8060405161003c9061006a565b610046919061011f565b604051809103906000f080158015610062573d6000803e3d6000fd5b505050610198565b6101f5806101e583390190565b600060208284031215610088578081fd5b81516001600160401b038082111561009e578283fd5b818401915084601f8301126100b1578283fd5b8151818111156100c3576100c3610182565b604051601f8201601f19908116603f011681019083821181831017156100eb576100eb610182565b81604052828152876020848701011115610103578586fd5b610114836020830160208801610152565b979650505050505050565b600060208252825180602084015261013e816040850160208701610152565b601f01601f19169190910160400192915050565b60005b8381101561016d578181015183820152602001610155565b8381111561017c576000848401525b50505050565b634e487b7160e01b600052604160045260246000fd5b603f806101a66000396000f3fe6080604052600080fdfea26469706673582212201bd8b1a777b100d67435ca4bb0b2fdccb13a2c2dde019b227bb553ff9a95bd4464736f6c63430008020033608060405234801561001057600080fd5b506040516101f53803806101f583398101604081905261002f916100c9565b60008151602083016000f090506001600160a01b0381166100865760405162461bcd60e51b815260206004820152600d60248201526c1111541313d657d19052531151609a1b604482015260640160405180910390fd5b6040516001600160a01b03821681527ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e9060200160405180910390a150506101a8565b600060208083850312156100db578182fd5b82516001600160401b03808211156100f1578384fd5b818501915085601f830112610104578384fd5b81518181111561011657610116610192565b604051601f8201601f19908116603f0116810190838211818310171561013e5761013e610192565b816040528281528886848701011115610155578687fd5b8693505b828410156101765784840186015181850187015292850192610159565b8284111561018657868684830101525b98975050505050505050565b634e487b7160e01b600052604160045260246000fd5b603f806101b66000396000f3fe6080604052600080fdfea2646970667358221220fbca036a163ed7f008cefa7c834d98d25109a456a051d41d9c89d55d7185d12b64736f6c63430008020033";
|
||||||
|
// Grab the bytecode of the ZeroEx artifact
|
||||||
|
bytes memory zeroExBytecode = vm.getCode("foundry-artifacts/ZeroEx.sol/ZeroEx.json");
|
||||||
|
// Append the required ZeroEx constructor arguments (address bootstrapper)
|
||||||
|
bytes memory zeroExDeploycode = abi.encodePacked(zeroExBytecode, abi.encode(initialMigration));
|
||||||
|
// Append the required deployer code constructor arguments (bytes initCode)
|
||||||
|
bytes memory deployerDeploycode = abi.encodePacked(deployerBytecode, abi.encode(zeroExDeploycode));
|
||||||
|
// The address is technically emitted in an event, but we know we did it correctly
|
||||||
|
//│ │ ├─ emit topic 0: 0xf40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e
|
||||||
|
//│ │ │ data: 0x000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff
|
||||||
|
assembly {
|
||||||
|
pop(create(0, add(deployerDeploycode, 0x20), mload(deployerDeploycode)))
|
||||||
|
}
|
||||||
|
|
||||||
|
initialMigration.initializeZeroEx(
|
||||||
|
payable(address(this)),
|
||||||
|
ZERO_EX,
|
||||||
|
InitialMigration.BootstrapFeatures({ registry: new SimpleFunctionRegistryFeature(), ownable: new OwnableFeature()})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "forge-std/Test.sol";
|
||||||
|
|
||||||
|
|
||||||
|
contract ForkUtils is Test {
|
||||||
|
/// Only run this function if the block number
|
||||||
|
// is greater than some constant for Ethereum Mainnet
|
||||||
|
modifier onlyForked {
|
||||||
|
if (block.number >= 14206900) {
|
||||||
|
_;
|
||||||
|
} else {
|
||||||
|
emit log_string("Requires fork mode, skipping");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright 2022 ZeroEx Intl.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
pragma solidity ^0.6;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
import "forge-std/Test.sol";
|
||||||
|
|
||||||
|
import "src/transformers/LibERC20Transformer.sol";
|
||||||
|
|
||||||
|
contract TestUtils is Test {
|
||||||
|
uint256 private constant MAX_UINT256_STRING_LENGTH = 78;
|
||||||
|
uint8 private constant ASCII_DIGIT_OFFSET = 48;
|
||||||
|
|
||||||
|
function _toString(uint256 n)
|
||||||
|
internal
|
||||||
|
pure
|
||||||
|
returns (string memory nstr)
|
||||||
|
{
|
||||||
|
if (n == 0) {
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
// Overallocate memory
|
||||||
|
nstr = new string(MAX_UINT256_STRING_LENGTH);
|
||||||
|
uint256 k = MAX_UINT256_STRING_LENGTH;
|
||||||
|
// Populate string from right to left (lsb to msb).
|
||||||
|
while (n != 0) {
|
||||||
|
assembly {
|
||||||
|
let char := add(
|
||||||
|
ASCII_DIGIT_OFFSET,
|
||||||
|
mod(n, 10)
|
||||||
|
)
|
||||||
|
mstore(add(nstr, k), char)
|
||||||
|
k := sub(k, 1)
|
||||||
|
n := div(n, 10)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assembly {
|
||||||
|
// Shift pointer over to actual start of string.
|
||||||
|
nstr := add(nstr, k)
|
||||||
|
// Store actual string length.
|
||||||
|
mstore(nstr, sub(MAX_UINT256_STRING_LENGTH, k))
|
||||||
|
}
|
||||||
|
return nstr;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _findTransformerNonce(
|
||||||
|
address transformer,
|
||||||
|
address deployer
|
||||||
|
)
|
||||||
|
internal
|
||||||
|
pure
|
||||||
|
returns (uint32)
|
||||||
|
{
|
||||||
|
address current;
|
||||||
|
for (uint32 i = 0; i < 1024; i++) {
|
||||||
|
current = LibERC20Transformer.getDeployedAddress(deployer, i);
|
||||||
|
if (current == transformer) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8
contracts/zero-ex/foundry.toml
Normal file
8
contracts/zero-ex/foundry.toml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[default]
|
||||||
|
src = 'contracts/src'
|
||||||
|
out = 'foundry-artifacts'
|
||||||
|
test = 'contracts/test/foundry'
|
||||||
|
libs = ["../utils/contracts/src/", "contracts/deps/"]
|
||||||
|
remappings = ['@0x/contracts-utils/=../utils/', '@0x/contracts-erc20/=../erc20/', 'src/=./contracts/src']
|
||||||
|
cache_path = 'foundry-cache'
|
||||||
|
optimizer_runs = 1000000
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-zero-ex",
|
"name": "@0x/contracts-zero-ex",
|
||||||
"version": "0.33.0",
|
"version": "0.32.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -38,12 +38,13 @@
|
|||||||
"docs:md": "ts-doc-gen --sourceDir='$PROJECT_FILES' --output=$MD_FILE_DIR --fileExtension=mdx --tsconfig=./typedoc-tsconfig.json",
|
"docs:md": "ts-doc-gen --sourceDir='$PROJECT_FILES' --output=$MD_FILE_DIR --fileExtension=mdx --tsconfig=./typedoc-tsconfig.json",
|
||||||
"docs:json": "typedoc --excludePrivate --excludeExternals --excludeProtected --ignoreCompilerErrors --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES",
|
"docs:json": "typedoc --excludePrivate --excludeExternals --excludeProtected --ignoreCompilerErrors --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES",
|
||||||
"publish:private": "yarn build && gitpkg publish",
|
"publish:private": "yarn build && gitpkg publish",
|
||||||
"rollback": "node ./lib/scripts/rollback.js"
|
"rollback": "node ./lib/scripts/rollback.js",
|
||||||
|
"typechain": "typechain --target=ethers-v5 --out-dir='typechain-wrappers' './foundry-artifacts/**/*.json'"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"publicInterfaceContracts": "IZeroEx,ZeroEx,FullMigration,InitialMigration,IFlashWallet,IERC20Transformer,IOwnableFeature,ISimpleFunctionRegistryFeature,ITransformERC20Feature,FillQuoteTransformer,PayTakerTransformer,PositiveSlippageFeeTransformer,WethTransformer,OwnableFeature,SimpleFunctionRegistryFeature,TransformERC20Feature,AffiliateFeeTransformer,MetaTransactionsFeature,LogMetadataTransformer,BridgeAdapter,LiquidityProviderFeature,ILiquidityProviderFeature,NativeOrdersFeature,INativeOrdersFeature,FeeCollectorController,FeeCollector,CurveLiquidityProvider,BatchFillNativeOrdersFeature,IBatchFillNativeOrdersFeature,MultiplexFeature,IMultiplexFeature,OtcOrdersFeature,IOtcOrdersFeature",
|
"publicInterfaceContracts": "IZeroEx,ZeroEx,FullMigration,InitialMigration,IFlashWallet,IERC20Transformer,IOwnableFeature,ISimpleFunctionRegistryFeature,ITransformERC20Feature,FillQuoteTransformer,PayTakerTransformer,PositiveSlippageFeeTransformer,WethTransformer,OwnableFeature,SimpleFunctionRegistryFeature,TransformERC20Feature,AffiliateFeeTransformer,MetaTransactionsFeature,LogMetadataTransformer,BridgeAdapter,LiquidityProviderFeature,ILiquidityProviderFeature,NativeOrdersFeature,INativeOrdersFeature,FeeCollectorController,FeeCollector,CurveLiquidityProvider,BatchFillNativeOrdersFeature,IBatchFillNativeOrdersFeature,MultiplexFeature,IMultiplexFeature,OtcOrdersFeature,IOtcOrdersFeature",
|
||||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
|
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
|
||||||
"abis": "./test/generated-artifacts/@(AffiliateFeeTransformer|BatchFillNativeOrdersFeature|BootstrapFeature|BridgeAdapter|BridgeProtocols|CurveLiquidityProvider|ERC1155OrdersFeature|ERC165Feature|ERC721OrdersFeature|FeeCollector|FeeCollectorController|FillQuoteTransformer|FixinCommon|FixinEIP712|FixinERC1155Spender|FixinERC721Spender|FixinProtocolFees|FixinReentrancyGuard|FixinTokenSpender|FlashWallet|FullMigration|FundRecoveryFeature|IBatchFillNativeOrdersFeature|IBootstrapFeature|IBridgeAdapter|IERC1155OrdersFeature|IERC1155Token|IERC165Feature|IERC20Bridge|IERC20Transformer|IERC721OrdersFeature|IERC721Token|IFeature|IFeeRecipient|IFlashWallet|IFundRecoveryFeature|ILiquidityProvider|ILiquidityProviderFeature|ILiquidityProviderSandbox|IMetaTransactionsFeature|IMooniswapPool|IMultiplexFeature|INativeOrdersEvents|INativeOrdersFeature|IOtcOrdersFeature|IOwnableFeature|IPancakeSwapFeature|IPropertyValidator|ISimpleFunctionRegistryFeature|IStaking|ITakerCallback|ITestSimpleFunctionRegistryFeature|ITokenSpenderFeature|ITransformERC20Feature|IUniswapFeature|IUniswapV2Pair|IUniswapV3Feature|IUniswapV3Pool|IZeroEx|InitialMigration|LibBootstrap|LibCommonRichErrors|LibERC1155OrdersStorage|LibERC20Transformer|LibERC721OrdersStorage|LibFeeCollector|LibLiquidityProviderRichErrors|LibMetaTransactionsRichErrors|LibMetaTransactionsStorage|LibMigrate|LibNFTOrder|LibNFTOrdersRichErrors|LibNativeOrder|LibNativeOrdersRichErrors|LibNativeOrdersStorage|LibOtcOrdersStorage|LibOwnableRichErrors|LibOwnableStorage|LibProxyRichErrors|LibProxyStorage|LibReentrancyGuardStorage|LibSignature|LibSignatureRichErrors|LibSimpleFunctionRegistryRichErrors|LibSimpleFunctionRegistryStorage|LibStorage|LibTransformERC20RichErrors|LibTransformERC20Storage|LibWalletRichErrors|LiquidityProviderFeature|LiquidityProviderSandbox|LogMetadataTransformer|MetaTransactionsFeature|MixinAaveV2|MixinBalancer|MixinBalancerV2|MixinBalancerV2Batch|MixinBancor|MixinCoFiX|MixinCompound|MixinCryptoCom|MixinCurve|MixinCurveV2|MixinDodo|MixinDodoV2|MixinGMX|MixinKyber|MixinKyberDmm|MixinLido|MixinMStable|MixinMakerPSM|MixinMooniswap|MixinNerve|MixinOasis|MixinPlatypus|MixinShell|MixinUniswap|MixinUniswapV2|MixinUniswapV3|MixinZeroExBridge|MooniswapLiquidityProvider|MultiplexFeature|MultiplexLiquidityProvider|MultiplexOtc|MultiplexRfq|MultiplexTransformERC20|MultiplexUniswapV2|MultiplexUniswapV3|NFTOrders|NativeOrdersCancellation|NativeOrdersFeature|NativeOrdersInfo|NativeOrdersProtocolFees|NativeOrdersSettlement|OtcOrdersFeature|OwnableFeature|PancakeSwapFeature|PayTakerTransformer|PermissionlessTransformerDeployer|PositiveSlippageFeeTransformer|SimpleFunctionRegistryFeature|TestBridge|TestCallTarget|TestCurve|TestDelegateCaller|TestFeeCollectorController|TestFeeRecipient|TestFillQuoteTransformerBridge|TestFillQuoteTransformerExchange|TestFillQuoteTransformerHost|TestFixinProtocolFees|TestFixinTokenSpender|TestFullMigration|TestInitialMigration|TestLibNativeOrder|TestLibSignature|TestLiquidityProvider|TestMetaTransactionsNativeOrdersFeature|TestMetaTransactionsTransformERC20Feature|TestMigrator|TestMintTokenERC20Transformer|TestMintableERC1155Token|TestMintableERC20Token|TestMintableERC721Token|TestMooniswap|TestNFTOrderPresigner|TestNativeOrdersFeature|TestNoEthRecipient|TestOrderSignerRegistryWithContractWallet|TestPermissionlessTransformerDeployerSuicidal|TestPermissionlessTransformerDeployerTransformer|TestPropertyValidator|TestRfqOriginRegistration|TestSimpleFunctionRegistryFeatureImpl1|TestSimpleFunctionRegistryFeatureImpl2|TestStaking|TestTokenSpenderERC20Token|TestTransformERC20|TestTransformerBase|TestTransformerDeployerTransformer|TestTransformerHost|TestUniswapV2Factory|TestUniswapV2Pool|TestUniswapV3Factory|TestUniswapV3Feature|TestUniswapV3Pool|TestWeth|TestWethTransformerHost|TestZeroExFeature|TransformERC20Feature|Transformer|TransformerDeployer|UniswapFeature|UniswapV3Feature|WethTransformer|ZeroEx|ZeroExOptimized).json"
|
"abis": "./test/generated-artifacts/@(AffiliateFeeTransformer|BatchFillNativeOrdersFeature|BootstrapFeature|BridgeAdapter|BridgeProtocols|CurveLiquidityProvider|ERC1155OrdersFeature|ERC165Feature|ERC721OrdersFeature|FeeCollector|FeeCollectorController|FillQuoteTransformer|FixinCommon|FixinEIP712|FixinERC1155Spender|FixinERC721Spender|FixinProtocolFees|FixinReentrancyGuard|FixinTokenSpender|FlashWallet|FullMigration|FundRecoveryFeature|IBatchFillNativeOrdersFeature|IBootstrapFeature|IBridgeAdapter|IERC1155OrdersFeature|IERC1155Token|IERC165Feature|IERC20Bridge|IERC20Transformer|IERC721OrdersFeature|IERC721Token|IFeature|IFeeRecipient|IFlashWallet|IFundRecoveryFeature|ILiquidityProvider|ILiquidityProviderFeature|ILiquidityProviderSandbox|IMetaTransactionsFeature|IMooniswapPool|IMultiplexFeature|INativeOrdersEvents|INativeOrdersFeature|IOtcOrdersFeature|IOwnableFeature|IPancakeSwapFeature|IPropertyValidator|ISimpleFunctionRegistryFeature|IStaking|ITakerCallback|ITestSimpleFunctionRegistryFeature|ITokenSpenderFeature|ITransformERC20Feature|IUniswapFeature|IUniswapV2Pair|IUniswapV3Feature|IUniswapV3Pool|IZeroEx|InitialMigration|LibBootstrap|LibCommonRichErrors|LibERC1155OrdersStorage|LibERC20Transformer|LibERC721OrdersStorage|LibFeeCollector|LibLiquidityProviderRichErrors|LibMetaTransactionsRichErrors|LibMetaTransactionsStorage|LibMigrate|LibNFTOrder|LibNFTOrdersRichErrors|LibNativeOrder|LibNativeOrdersRichErrors|LibNativeOrdersStorage|LibOtcOrdersStorage|LibOwnableRichErrors|LibOwnableStorage|LibProxyRichErrors|LibProxyStorage|LibReentrancyGuardStorage|LibSignature|LibSignatureRichErrors|LibSimpleFunctionRegistryRichErrors|LibSimpleFunctionRegistryStorage|LibStorage|LibTransformERC20RichErrors|LibTransformERC20Storage|LibWalletRichErrors|LiquidityProviderFeature|LiquidityProviderSandbox|LogMetadataTransformer|MetaTransactionsFeature|MixinAaveV2|MixinBalancer|MixinBalancerV2|MixinBalancerV2Batch|MixinBancor|MixinCoFiX|MixinCompound|MixinCryptoCom|MixinCurve|MixinCurveV2|MixinDodo|MixinDodoV2|MixinKyber|MixinKyberDmm|MixinLido|MixinMStable|MixinMakerPSM|MixinMooniswap|MixinNerve|MixinOasis|MixinShell|MixinUniswap|MixinUniswapV2|MixinUniswapV3|MixinZeroExBridge|MooniswapLiquidityProvider|MultiplexFeature|MultiplexLiquidityProvider|MultiplexOtc|MultiplexRfq|MultiplexTransformERC20|MultiplexUniswapV2|MultiplexUniswapV3|NFTOrders|NativeOrdersCancellation|NativeOrdersFeature|NativeOrdersInfo|NativeOrdersProtocolFees|NativeOrdersSettlement|OtcOrdersFeature|OwnableFeature|PancakeSwapFeature|PayTakerTransformer|PermissionlessTransformerDeployer|PositiveSlippageFeeTransformer|SimpleFunctionRegistryFeature|TestBridge|TestCallTarget|TestCurve|TestDelegateCaller|TestFeeCollectorController|TestFeeRecipient|TestFillQuoteTransformerBridge|TestFillQuoteTransformerExchange|TestFillQuoteTransformerHost|TestFixinProtocolFees|TestFixinTokenSpender|TestFullMigration|TestInitialMigration|TestLibNativeOrder|TestLibSignature|TestLiquidityProvider|TestMetaTransactionsNativeOrdersFeature|TestMetaTransactionsTransformERC20Feature|TestMigrator|TestMintTokenERC20Transformer|TestMintableERC1155Token|TestMintableERC20Token|TestMintableERC721Token|TestMooniswap|TestNFTOrderPresigner|TestNativeOrdersFeature|TestNoEthRecipient|TestOrderSignerRegistryWithContractWallet|TestPermissionlessTransformerDeployerSuicidal|TestPermissionlessTransformerDeployerTransformer|TestPropertyValidator|TestRfqOriginRegistration|TestSimpleFunctionRegistryFeatureImpl1|TestSimpleFunctionRegistryFeatureImpl2|TestStaking|TestTokenSpenderERC20Token|TestTransformERC20|TestTransformerBase|TestTransformerDeployerTransformer|TestTransformerHost|TestUniswapV2Factory|TestUniswapV2Pool|TestUniswapV3Factory|TestUniswapV3Feature|TestUniswapV3Pool|TestWeth|TestWethTransformerHost|TestZeroExFeature|TransformERC20Feature|Transformer|TransformerDeployer|UniswapFeature|UniswapV3Feature|WethTransformer|ZeroEx|ZeroExOptimized).json"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -56,15 +57,16 @@
|
|||||||
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/zero-ex",
|
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/zero-ex",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.8.0",
|
"@0x/abi-gen": "^5.8.0",
|
||||||
"@0x/contract-addresses": "^6.14.0",
|
"@0x/contract-addresses": "^6.13.0",
|
||||||
"@0x/contracts-erc20": "^3.3.30",
|
"@0x/contracts-erc20": "^3.3.29",
|
||||||
"@0x/contracts-gen": "^2.0.46",
|
"@0x/contracts-gen": "^2.0.46",
|
||||||
"@0x/contracts-test-utils": "^5.4.21",
|
"@0x/contracts-test-utils": "^5.4.20",
|
||||||
"@0x/dev-utils": "^4.2.14",
|
"@0x/dev-utils": "^4.2.14",
|
||||||
"@0x/order-utils": "^10.4.28",
|
"@0x/order-utils": "^10.4.28",
|
||||||
"@0x/sol-compiler": "^4.8.1",
|
"@0x/sol-compiler": "^4.8.1",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
"@0x/tslint-config": "^4.1.4",
|
"@0x/tslint-config": "^4.1.4",
|
||||||
|
"@typechain/ethers-v5": "^10.0.0",
|
||||||
"@types/isomorphic-fetch": "^0.0.35",
|
"@types/isomorphic-fetch": "^0.0.35",
|
||||||
"@types/lodash": "4.14.104",
|
"@types/lodash": "4.14.104",
|
||||||
"@types/mocha": "^5.2.7",
|
"@types/mocha": "^5.2.7",
|
||||||
@@ -78,12 +80,13 @@
|
|||||||
"solhint": "^1.4.1",
|
"solhint": "^1.4.1",
|
||||||
"truffle": "^5.0.32",
|
"truffle": "^5.0.32",
|
||||||
"tslint": "5.11.0",
|
"tslint": "5.11.0",
|
||||||
|
"typechain": "^8.0.0",
|
||||||
"typedoc": "~0.16.11",
|
"typedoc": "~0.16.11",
|
||||||
"typescript": "4.6.3"
|
"typescript": "4.6.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^6.5.0",
|
"@0x/base-contract": "^6.5.0",
|
||||||
"@0x/protocol-utils": "^11.13.0",
|
"@0x/protocol-utils": "^11.12.0",
|
||||||
"@0x/subproviders": "^6.6.5",
|
"@0x/subproviders": "^6.6.5",
|
||||||
"@0x/types": "^3.3.6",
|
"@0x/types": "^3.3.6",
|
||||||
"@0x/typescript-typings": "^5.3.1",
|
"@0x/typescript-typings": "^5.3.1",
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ import * as MixinCurve from '../test/generated-artifacts/MixinCurve.json';
|
|||||||
import * as MixinCurveV2 from '../test/generated-artifacts/MixinCurveV2.json';
|
import * as MixinCurveV2 from '../test/generated-artifacts/MixinCurveV2.json';
|
||||||
import * as MixinDodo from '../test/generated-artifacts/MixinDodo.json';
|
import * as MixinDodo from '../test/generated-artifacts/MixinDodo.json';
|
||||||
import * as MixinDodoV2 from '../test/generated-artifacts/MixinDodoV2.json';
|
import * as MixinDodoV2 from '../test/generated-artifacts/MixinDodoV2.json';
|
||||||
import * as MixinGMX from '../test/generated-artifacts/MixinGMX.json';
|
|
||||||
import * as MixinKyber from '../test/generated-artifacts/MixinKyber.json';
|
import * as MixinKyber from '../test/generated-artifacts/MixinKyber.json';
|
||||||
import * as MixinKyberDmm from '../test/generated-artifacts/MixinKyberDmm.json';
|
import * as MixinKyberDmm from '../test/generated-artifacts/MixinKyberDmm.json';
|
||||||
import * as MixinLido from '../test/generated-artifacts/MixinLido.json';
|
import * as MixinLido from '../test/generated-artifacts/MixinLido.json';
|
||||||
@@ -119,7 +118,6 @@ import * as MixinMooniswap from '../test/generated-artifacts/MixinMooniswap.json
|
|||||||
import * as MixinMStable from '../test/generated-artifacts/MixinMStable.json';
|
import * as MixinMStable from '../test/generated-artifacts/MixinMStable.json';
|
||||||
import * as MixinNerve from '../test/generated-artifacts/MixinNerve.json';
|
import * as MixinNerve from '../test/generated-artifacts/MixinNerve.json';
|
||||||
import * as MixinOasis from '../test/generated-artifacts/MixinOasis.json';
|
import * as MixinOasis from '../test/generated-artifacts/MixinOasis.json';
|
||||||
import * as MixinPlatypus from '../test/generated-artifacts/MixinPlatypus.json';
|
|
||||||
import * as MixinShell from '../test/generated-artifacts/MixinShell.json';
|
import * as MixinShell from '../test/generated-artifacts/MixinShell.json';
|
||||||
import * as MixinUniswap from '../test/generated-artifacts/MixinUniswap.json';
|
import * as MixinUniswap from '../test/generated-artifacts/MixinUniswap.json';
|
||||||
import * as MixinUniswapV2 from '../test/generated-artifacts/MixinUniswapV2.json';
|
import * as MixinUniswapV2 from '../test/generated-artifacts/MixinUniswapV2.json';
|
||||||
@@ -325,7 +323,6 @@ export const artifacts = {
|
|||||||
MixinCurveV2: MixinCurveV2 as ContractArtifact,
|
MixinCurveV2: MixinCurveV2 as ContractArtifact,
|
||||||
MixinDodo: MixinDodo as ContractArtifact,
|
MixinDodo: MixinDodo as ContractArtifact,
|
||||||
MixinDodoV2: MixinDodoV2 as ContractArtifact,
|
MixinDodoV2: MixinDodoV2 as ContractArtifact,
|
||||||
MixinGMX: MixinGMX as ContractArtifact,
|
|
||||||
MixinKyber: MixinKyber as ContractArtifact,
|
MixinKyber: MixinKyber as ContractArtifact,
|
||||||
MixinKyberDmm: MixinKyberDmm as ContractArtifact,
|
MixinKyberDmm: MixinKyberDmm as ContractArtifact,
|
||||||
MixinLido: MixinLido as ContractArtifact,
|
MixinLido: MixinLido as ContractArtifact,
|
||||||
@@ -334,7 +331,6 @@ export const artifacts = {
|
|||||||
MixinMooniswap: MixinMooniswap as ContractArtifact,
|
MixinMooniswap: MixinMooniswap as ContractArtifact,
|
||||||
MixinNerve: MixinNerve as ContractArtifact,
|
MixinNerve: MixinNerve as ContractArtifact,
|
||||||
MixinOasis: MixinOasis as ContractArtifact,
|
MixinOasis: MixinOasis as ContractArtifact,
|
||||||
MixinPlatypus: MixinPlatypus as ContractArtifact,
|
|
||||||
MixinShell: MixinShell as ContractArtifact,
|
MixinShell: MixinShell as ContractArtifact,
|
||||||
MixinUniswap: MixinUniswap as ContractArtifact,
|
MixinUniswap: MixinUniswap as ContractArtifact,
|
||||||
MixinUniswapV2: MixinUniswapV2 as ContractArtifact,
|
MixinUniswapV2: MixinUniswapV2 as ContractArtifact,
|
||||||
|
|||||||
@@ -108,7 +108,6 @@ export * from '../test/generated-wrappers/mixin_curve';
|
|||||||
export * from '../test/generated-wrappers/mixin_curve_v2';
|
export * from '../test/generated-wrappers/mixin_curve_v2';
|
||||||
export * from '../test/generated-wrappers/mixin_dodo';
|
export * from '../test/generated-wrappers/mixin_dodo';
|
||||||
export * from '../test/generated-wrappers/mixin_dodo_v2';
|
export * from '../test/generated-wrappers/mixin_dodo_v2';
|
||||||
export * from '../test/generated-wrappers/mixin_g_m_x';
|
|
||||||
export * from '../test/generated-wrappers/mixin_kyber';
|
export * from '../test/generated-wrappers/mixin_kyber';
|
||||||
export * from '../test/generated-wrappers/mixin_kyber_dmm';
|
export * from '../test/generated-wrappers/mixin_kyber_dmm';
|
||||||
export * from '../test/generated-wrappers/mixin_lido';
|
export * from '../test/generated-wrappers/mixin_lido';
|
||||||
@@ -117,7 +116,6 @@ export * from '../test/generated-wrappers/mixin_maker_p_s_m';
|
|||||||
export * from '../test/generated-wrappers/mixin_mooniswap';
|
export * from '../test/generated-wrappers/mixin_mooniswap';
|
||||||
export * from '../test/generated-wrappers/mixin_nerve';
|
export * from '../test/generated-wrappers/mixin_nerve';
|
||||||
export * from '../test/generated-wrappers/mixin_oasis';
|
export * from '../test/generated-wrappers/mixin_oasis';
|
||||||
export * from '../test/generated-wrappers/mixin_platypus';
|
|
||||||
export * from '../test/generated-wrappers/mixin_shell';
|
export * from '../test/generated-wrappers/mixin_shell';
|
||||||
export * from '../test/generated-wrappers/mixin_uniswap';
|
export * from '../test/generated-wrappers/mixin_uniswap';
|
||||||
export * from '../test/generated-wrappers/mixin_uniswap_v2';
|
export * from '../test/generated-wrappers/mixin_uniswap_v2';
|
||||||
|
|||||||
@@ -141,7 +141,6 @@
|
|||||||
"test/generated-artifacts/MixinCurveV2.json",
|
"test/generated-artifacts/MixinCurveV2.json",
|
||||||
"test/generated-artifacts/MixinDodo.json",
|
"test/generated-artifacts/MixinDodo.json",
|
||||||
"test/generated-artifacts/MixinDodoV2.json",
|
"test/generated-artifacts/MixinDodoV2.json",
|
||||||
"test/generated-artifacts/MixinGMX.json",
|
|
||||||
"test/generated-artifacts/MixinKyber.json",
|
"test/generated-artifacts/MixinKyber.json",
|
||||||
"test/generated-artifacts/MixinKyberDmm.json",
|
"test/generated-artifacts/MixinKyberDmm.json",
|
||||||
"test/generated-artifacts/MixinLido.json",
|
"test/generated-artifacts/MixinLido.json",
|
||||||
@@ -150,7 +149,6 @@
|
|||||||
"test/generated-artifacts/MixinMooniswap.json",
|
"test/generated-artifacts/MixinMooniswap.json",
|
||||||
"test/generated-artifacts/MixinNerve.json",
|
"test/generated-artifacts/MixinNerve.json",
|
||||||
"test/generated-artifacts/MixinOasis.json",
|
"test/generated-artifacts/MixinOasis.json",
|
||||||
"test/generated-artifacts/MixinPlatypus.json",
|
|
||||||
"test/generated-artifacts/MixinShell.json",
|
"test/generated-artifacts/MixinShell.json",
|
||||||
"test/generated-artifacts/MixinUniswap.json",
|
"test/generated-artifacts/MixinUniswap.json",
|
||||||
"test/generated-artifacts/MixinUniswapV2.json",
|
"test/generated-artifacts/MixinUniswapV2.json",
|
||||||
|
|||||||
@@ -5,21 +5,8 @@
|
|||||||
{
|
{
|
||||||
"note": "Add BiSwap on BSC",
|
"note": "Add BiSwap on BSC",
|
||||||
"pr": 467
|
"pr": 467
|
||||||
},
|
|
||||||
{
|
|
||||||
"note": "Add GMX and Platypus on Avalanche and Enable KyberDMM on bsc",
|
|
||||||
"pr": 478
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"note": "Add Yoshi Exchange support in Fantom",
|
|
||||||
"pr": 473
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"note": "Fix KyberDMM gas underestimation",
|
|
||||||
"pr": 479
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"timestamp": 1652919697
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "16.59.0",
|
"version": "16.59.0",
|
||||||
|
|||||||
@@ -5,13 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v16.60.0 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Add BiSwap on BSC (#467)
|
|
||||||
* Add GMX and Platypus on Avalanche and Enable KyberDMM on bsc (#478)
|
|
||||||
* Add Yoshi Exchange support in Fantom (#473)
|
|
||||||
* Fix KyberDMM gas underestimation (#479)
|
|
||||||
|
|
||||||
## v16.59.0 - _May 13, 2022_
|
## v16.59.0 - _May 13, 2022_
|
||||||
|
|
||||||
* Remove SnowSwap on mainnet (#468)
|
* Remove SnowSwap on mainnet (#468)
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import "./CompoundSampler.sol";
|
|||||||
import "./CurveSampler.sol";
|
import "./CurveSampler.sol";
|
||||||
import "./DODOSampler.sol";
|
import "./DODOSampler.sol";
|
||||||
import "./DODOV2Sampler.sol";
|
import "./DODOV2Sampler.sol";
|
||||||
import "./GMXSampler.sol";
|
|
||||||
import "./KyberSampler.sol";
|
import "./KyberSampler.sol";
|
||||||
import "./KyberDmmSampler.sol";
|
import "./KyberDmmSampler.sol";
|
||||||
import "./LidoSampler.sol";
|
import "./LidoSampler.sol";
|
||||||
@@ -37,7 +36,6 @@ import "./MakerPSMSampler.sol";
|
|||||||
import "./MStableSampler.sol";
|
import "./MStableSampler.sol";
|
||||||
import "./MooniswapSampler.sol";
|
import "./MooniswapSampler.sol";
|
||||||
import "./NativeOrderSampler.sol";
|
import "./NativeOrderSampler.sol";
|
||||||
import "./PlatypusSampler.sol";
|
|
||||||
import "./ShellSampler.sol";
|
import "./ShellSampler.sol";
|
||||||
import "./SmoothySampler.sol";
|
import "./SmoothySampler.sol";
|
||||||
import "./TwoHopSampler.sol";
|
import "./TwoHopSampler.sol";
|
||||||
@@ -56,7 +54,6 @@ contract ERC20BridgeSampler is
|
|||||||
CurveSampler,
|
CurveSampler,
|
||||||
DODOSampler,
|
DODOSampler,
|
||||||
DODOV2Sampler,
|
DODOV2Sampler,
|
||||||
GMXSampler,
|
|
||||||
KyberSampler,
|
KyberSampler,
|
||||||
KyberDmmSampler,
|
KyberDmmSampler,
|
||||||
LidoSampler,
|
LidoSampler,
|
||||||
@@ -65,7 +62,6 @@ contract ERC20BridgeSampler is
|
|||||||
MStableSampler,
|
MStableSampler,
|
||||||
MooniswapSampler,
|
MooniswapSampler,
|
||||||
NativeOrderSampler,
|
NativeOrderSampler,
|
||||||
PlatypusSampler,
|
|
||||||
ShellSampler,
|
ShellSampler,
|
||||||
SmoothySampler,
|
SmoothySampler,
|
||||||
TwoHopSampler,
|
TwoHopSampler,
|
||||||
|
|||||||
@@ -1,96 +0,0 @@
|
|||||||
pragma solidity ^0.6;
|
|
||||||
pragma experimental ABIEncoderV2;
|
|
||||||
|
|
||||||
import "./interfaces/IGMX.sol";
|
|
||||||
import "./ApproximateBuys.sol";
|
|
||||||
import "./SamplerUtils.sol";
|
|
||||||
|
|
||||||
contract GMXSampler is
|
|
||||||
SamplerUtils,
|
|
||||||
ApproximateBuys
|
|
||||||
{
|
|
||||||
struct GMXInfo {
|
|
||||||
address reader;
|
|
||||||
address vault;
|
|
||||||
address[] path;
|
|
||||||
}
|
|
||||||
|
|
||||||
function sampleSellsFromGMX(
|
|
||||||
address reader,
|
|
||||||
address vault,
|
|
||||||
address[] memory path,
|
|
||||||
uint256[] memory takerTokenAmounts
|
|
||||||
)
|
|
||||||
public
|
|
||||||
view
|
|
||||||
returns (uint256[] memory makerTokenAmounts)
|
|
||||||
{
|
|
||||||
uint256 numSamples = takerTokenAmounts.length;
|
|
||||||
makerTokenAmounts = new uint256[](numSamples);
|
|
||||||
for (uint256 i = 0; i < numSamples; i++) {
|
|
||||||
try
|
|
||||||
IGMX(reader).getAmountOut(IVault(vault), path[0], path[1], takerTokenAmounts[i])
|
|
||||||
returns (uint256 amountAfterFees, uint256 feeAmount)
|
|
||||||
{
|
|
||||||
makerTokenAmounts[i] = amountAfterFees;
|
|
||||||
// Break early if there are 0 amounts
|
|
||||||
if (makerTokenAmounts[i] == 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} catch (bytes memory) {
|
|
||||||
// Swallow failures, leaving all results as zero.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function sampleBuysFromGMX(
|
|
||||||
address reader,
|
|
||||||
address vault,
|
|
||||||
address[] memory path,
|
|
||||||
uint256[] memory makerTokenAmounts
|
|
||||||
)
|
|
||||||
public
|
|
||||||
view
|
|
||||||
returns (uint256[] memory takerTokenAmounts)
|
|
||||||
{
|
|
||||||
address[] memory invertBuyPath = new address[](2);
|
|
||||||
invertBuyPath[0] = path[1];
|
|
||||||
invertBuyPath[1] = path[0];
|
|
||||||
return _sampleApproximateBuys(
|
|
||||||
ApproximateBuyQuoteOpts({
|
|
||||||
makerTokenData: abi.encode(reader, vault, invertBuyPath),
|
|
||||||
takerTokenData: abi.encode(reader, vault, path),
|
|
||||||
getSellQuoteCallback: _sampleSellForApproximateBuyFromGMX
|
|
||||||
}),
|
|
||||||
makerTokenAmounts
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function _sampleSellForApproximateBuyFromGMX(
|
|
||||||
bytes memory takerTokenData,
|
|
||||||
bytes memory makerTokenData,
|
|
||||||
uint256 sellAmount
|
|
||||||
)
|
|
||||||
private
|
|
||||||
view
|
|
||||||
returns (uint256 buyAmount)
|
|
||||||
{
|
|
||||||
(address _reader, address _vault, address[] memory _path ) = abi.decode(takerTokenData, (address, address, address[]));
|
|
||||||
|
|
||||||
(bool success, bytes memory resultData) = address(this).staticcall(abi.encodeWithSelector(
|
|
||||||
this.sampleSellsFromGMX.selector,
|
|
||||||
_reader,
|
|
||||||
_vault,
|
|
||||||
_path,
|
|
||||||
_toSingleValueArray(sellAmount)
|
|
||||||
));
|
|
||||||
if(!success) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
// solhint-disable-next-line indent
|
|
||||||
return abi.decode(resultData, (uint256[]))[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
pragma solidity ^0.6;
|
|
||||||
pragma experimental ABIEncoderV2;
|
|
||||||
|
|
||||||
import "./interfaces/IPlatypus.sol";
|
|
||||||
import "./ApproximateBuys.sol";
|
|
||||||
import "./SamplerUtils.sol";
|
|
||||||
|
|
||||||
|
|
||||||
contract PlatypusSampler is
|
|
||||||
SamplerUtils,
|
|
||||||
ApproximateBuys
|
|
||||||
{
|
|
||||||
|
|
||||||
function sampleSellsFromPlatypus(
|
|
||||||
address pool,
|
|
||||||
address[] memory path,
|
|
||||||
uint256[] memory takerTokenAmounts
|
|
||||||
)
|
|
||||||
public
|
|
||||||
view
|
|
||||||
returns (uint256[] memory makerTokenAmounts)
|
|
||||||
{
|
|
||||||
|
|
||||||
uint256 numSamples = takerTokenAmounts.length;
|
|
||||||
makerTokenAmounts = new uint256[](numSamples);
|
|
||||||
for (uint256 i = 0; i < numSamples; i++) {
|
|
||||||
try
|
|
||||||
IPlatypus(pool).quotePotentialSwap(path[0], path[1], takerTokenAmounts[i])
|
|
||||||
returns (uint256 amountAfterFees, uint256 feeAmount)
|
|
||||||
{
|
|
||||||
makerTokenAmounts[i] = amountAfterFees;
|
|
||||||
// Break early if there are 0 amounts
|
|
||||||
if (makerTokenAmounts[i] == 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} catch (bytes memory result) {
|
|
||||||
// Swallow failures, leaving all results as zero.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function sampleBuysFromPlatypus(
|
|
||||||
address pool,
|
|
||||||
address[] memory path,
|
|
||||||
uint256[] memory makerTokenAmounts
|
|
||||||
)
|
|
||||||
public
|
|
||||||
view
|
|
||||||
returns (uint256[] memory takerTokenAmounts)
|
|
||||||
{
|
|
||||||
address[] memory invertBuyPath = new address[](2);
|
|
||||||
invertBuyPath[0] = path[1];
|
|
||||||
invertBuyPath[1] = path[0];
|
|
||||||
return _sampleApproximateBuys(
|
|
||||||
ApproximateBuyQuoteOpts({
|
|
||||||
makerTokenData: abi.encode(pool, invertBuyPath),
|
|
||||||
takerTokenData: abi.encode(pool, path),
|
|
||||||
getSellQuoteCallback: _sampleSellForApproximateBuyFromPlatypus
|
|
||||||
}),
|
|
||||||
makerTokenAmounts
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function _sampleSellForApproximateBuyFromPlatypus(
|
|
||||||
bytes memory makerTokenData,
|
|
||||||
bytes memory takerTokenData,
|
|
||||||
uint256 sellAmount
|
|
||||||
)
|
|
||||||
private
|
|
||||||
view
|
|
||||||
returns (uint256 buyAmount)
|
|
||||||
{
|
|
||||||
(address _pool, address[] memory _path ) = abi.decode(makerTokenData, (address, address[]));
|
|
||||||
|
|
||||||
(bool success, bytes memory resultData) = address(this).staticcall(abi.encodeWithSelector(
|
|
||||||
this.sampleSellsFromPlatypus.selector,
|
|
||||||
_pool,
|
|
||||||
_path,
|
|
||||||
_toSingleValueArray(sellAmount)
|
|
||||||
));
|
|
||||||
if(!success) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
// solhint-disable-next-line indent
|
|
||||||
return abi.decode(resultData, (uint256[]))[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
pragma solidity ^0.6;
|
|
||||||
pragma experimental ABIEncoderV2;
|
|
||||||
|
|
||||||
interface IGMX {
|
|
||||||
function getMaxAmountIn(IVault _vault, address _tokenIn, address _tokenOut)
|
|
||||||
external
|
|
||||||
view
|
|
||||||
returns (uint256);
|
|
||||||
|
|
||||||
function getAmountOut(IVault _vault, address _tokenIn, address _tokenOut, uint256 _amountIn)
|
|
||||||
external
|
|
||||||
view
|
|
||||||
returns (uint256, uint256);
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IVault {
|
|
||||||
function getFeeBasisPoints(address _token, uint256 _usdgDelta, uint256 _feeBasisPoints, uint256 _taxBasisPoints, bool _increment) external view returns (uint256);
|
|
||||||
function stableSwapFeeBasisPoints() external view returns (uint256);
|
|
||||||
function stableTokens(address _token) external view returns (bool);
|
|
||||||
function tokenDecimals(address _token) external view returns (uint256);
|
|
||||||
function getMaxPrice(address _token) external view returns (uint256);
|
|
||||||
function getMinPrice(address _token) external view returns (uint256);
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
pragma solidity ^0.6;
|
|
||||||
|
|
||||||
interface IPlatypus {
|
|
||||||
function quotePotentialSwap(
|
|
||||||
address fromToken,
|
|
||||||
address toToken,
|
|
||||||
uint256 fromAmount
|
|
||||||
) external view returns (uint256 potentialOutcome, uint256 haircut);
|
|
||||||
|
|
||||||
function assetOf(address token) external view returns (address);
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/asset-swapper",
|
"name": "@0x/asset-swapper",
|
||||||
"version": "16.60.0",
|
"version": "16.59.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"publicInterfaceContracts": "ERC20BridgeSampler,BalanceChecker,FakeTaker",
|
"publicInterfaceContracts": "ERC20BridgeSampler,BalanceChecker,FakeTaker",
|
||||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
|
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
|
||||||
"abis": "./test/generated-artifacts/@(ApproximateBuys|BalanceChecker|BalancerSampler|BalancerV2BatchSampler|BalancerV2Common|BalancerV2Sampler|BancorSampler|CompoundSampler|CurveSampler|DODOSampler|DODOV2Sampler|ERC20BridgeSampler|FakeTaker|GMXSampler|IBalancer|IBalancerV2Vault|IBancor|ICurve|IGMX|IKyberNetwork|IMStable|IMooniswap|IMultiBridge|IPlatypus|IShell|ISmoothy|IUniswapExchangeQuotes|IUniswapV2Router01|KyberDmmSampler|KyberSampler|LidoSampler|LiquidityProviderSampler|MStableSampler|MakerPSMSampler|MooniswapSampler|NativeOrderSampler|PlatypusSampler|SamplerUtils|ShellSampler|SmoothySampler|TestNativeOrderSampler|TwoHopSampler|UniswapSampler|UniswapV2Sampler|UniswapV3Sampler|UtilitySampler).json",
|
"abis": "./test/generated-artifacts/@(ApproximateBuys|BalanceChecker|BalancerSampler|BalancerV2BatchSampler|BalancerV2Common|BalancerV2Sampler|BancorSampler|CompoundSampler|CurveSampler|DODOSampler|DODOV2Sampler|ERC20BridgeSampler|FakeTaker|IBalancer|IBalancerV2Vault|IBancor|ICurve|IKyberNetwork|IMStable|IMooniswap|IMultiBridge|IShell|ISmoothy|IUniswapExchangeQuotes|IUniswapV2Router01|KyberDmmSampler|KyberSampler|LidoSampler|LiquidityProviderSampler|MStableSampler|MakerPSMSampler|MooniswapSampler|NativeOrderSampler|SamplerUtils|ShellSampler|SmoothySampler|TestNativeOrderSampler|TwoHopSampler|UniswapSampler|UniswapV2Sampler|UniswapV3Sampler|UtilitySampler).json",
|
||||||
"postpublish": {
|
"postpublish": {
|
||||||
"assets": []
|
"assets": []
|
||||||
}
|
}
|
||||||
@@ -60,14 +60,14 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.34",
|
"@0x/assert": "^3.0.34",
|
||||||
"@0x/base-contract": "^6.5.0",
|
"@0x/base-contract": "^6.5.0",
|
||||||
"@0x/contract-addresses": "^6.14.0",
|
"@0x/contract-addresses": "^6.13.0",
|
||||||
"@0x/contract-wrappers": "^13.20.2",
|
"@0x/contract-wrappers": "^13.20.1",
|
||||||
"@0x/contracts-erc20": "^3.3.30",
|
"@0x/contracts-erc20": "^3.3.29",
|
||||||
"@0x/contracts-zero-ex": "^0.33.0",
|
"@0x/contracts-zero-ex": "^0.32.0",
|
||||||
"@0x/dev-utils": "^4.2.14",
|
"@0x/dev-utils": "^4.2.14",
|
||||||
"@0x/json-schemas": "^6.4.4",
|
"@0x/json-schemas": "^6.4.4",
|
||||||
"@0x/neon-router": "^0.3.5",
|
"@0x/neon-router": "^0.3.5",
|
||||||
"@0x/protocol-utils": "^11.13.0",
|
"@0x/protocol-utils": "^11.12.0",
|
||||||
"@0x/quote-server": "^6.0.6",
|
"@0x/quote-server": "^6.0.6",
|
||||||
"@0x/types": "^3.3.6",
|
"@0x/types": "^3.3.6",
|
||||||
"@0x/typescript-typings": "^5.3.1",
|
"@0x/typescript-typings": "^5.3.1",
|
||||||
@@ -100,10 +100,10 @@
|
|||||||
"@0x/contracts-exchange": "^3.2.38",
|
"@0x/contracts-exchange": "^3.2.38",
|
||||||
"@0x/contracts-exchange-libs": "^4.3.37",
|
"@0x/contracts-exchange-libs": "^4.3.37",
|
||||||
"@0x/contracts-gen": "^2.0.46",
|
"@0x/contracts-gen": "^2.0.46",
|
||||||
"@0x/contracts-test-utils": "^5.4.21",
|
"@0x/contracts-test-utils": "^5.4.20",
|
||||||
"@0x/contracts-utils": "^4.8.11",
|
"@0x/contracts-utils": "^4.8.10",
|
||||||
"@0x/mesh-rpc-client": "^9.4.2",
|
"@0x/mesh-rpc-client": "^9.4.2",
|
||||||
"@0x/migrations": "^8.1.19",
|
"@0x/migrations": "^8.1.18",
|
||||||
"@0x/sol-compiler": "^4.8.1",
|
"@0x/sol-compiler": "^4.8.1",
|
||||||
"@0x/subproviders": "^6.6.5",
|
"@0x/subproviders": "^6.6.5",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ import {
|
|||||||
PANCAKESWAP_ROUTER_BY_CHAIN_ID,
|
PANCAKESWAP_ROUTER_BY_CHAIN_ID,
|
||||||
PANCAKESWAPV2_ROUTER_BY_CHAIN_ID,
|
PANCAKESWAPV2_ROUTER_BY_CHAIN_ID,
|
||||||
PANGOLIN_ROUTER_BY_CHAIN_ID,
|
PANGOLIN_ROUTER_BY_CHAIN_ID,
|
||||||
PLATYPUS_AVALANCHE_INFOS,
|
|
||||||
POLYDEX_ROUTER_BY_CHAIN_ID,
|
POLYDEX_ROUTER_BY_CHAIN_ID,
|
||||||
QUICKSWAP_ROUTER_BY_CHAIN_ID,
|
QUICKSWAP_ROUTER_BY_CHAIN_ID,
|
||||||
SADDLE_MAINNET_INFOS,
|
SADDLE_MAINNET_INFOS,
|
||||||
@@ -62,9 +61,8 @@ import {
|
|||||||
UNISWAPV2_ROUTER_BY_CHAIN_ID,
|
UNISWAPV2_ROUTER_BY_CHAIN_ID,
|
||||||
WAULTSWAP_ROUTER_BY_CHAIN_ID,
|
WAULTSWAP_ROUTER_BY_CHAIN_ID,
|
||||||
XSIGMA_MAINNET_INFOS,
|
XSIGMA_MAINNET_INFOS,
|
||||||
YOSHI_ROUTER_BY_CHAIN_ID,
|
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { CurveInfo, ERC20BridgeSource, PlatypusInfo } from './types';
|
import { CurveInfo, ERC20BridgeSource } from './types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter Kyber reserves which should not be used (0xbb bridged reserves)
|
* Filter Kyber reserves which should not be used (0xbb bridged reserves)
|
||||||
@@ -438,15 +436,6 @@ export function getMobiusMoneyInfoForPair(chainId: ChainId, takerToken: string,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPlatypusInfoForPair(chainId: ChainId, takerToken: string, makerToken: string): PlatypusInfo[] {
|
|
||||||
if (chainId !== ChainId.Avalanche) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
return Object.values(PLATYPUS_AVALANCHE_INFOS).filter(c =>
|
|
||||||
[makerToken, takerToken].every(t => c.tokens.includes(t)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getShellLikeInfosForPair(
|
export function getShellLikeInfosForPair(
|
||||||
chainId: ChainId,
|
chainId: ChainId,
|
||||||
takerToken: string,
|
takerToken: string,
|
||||||
@@ -566,8 +555,7 @@ export function uniswapV2LikeRouterAddress(
|
|||||||
| ERC20BridgeSource.MorpheusSwap
|
| ERC20BridgeSource.MorpheusSwap
|
||||||
| ERC20BridgeSource.SpookySwap
|
| ERC20BridgeSource.SpookySwap
|
||||||
| ERC20BridgeSource.SpiritSwap
|
| ERC20BridgeSource.SpiritSwap
|
||||||
| ERC20BridgeSource.BiSwap
|
| ERC20BridgeSource.BiSwap,
|
||||||
| ERC20BridgeSource.Yoshi,
|
|
||||||
): string {
|
): string {
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case ERC20BridgeSource.UniswapV2:
|
case ERC20BridgeSource.UniswapV2:
|
||||||
@@ -618,8 +606,6 @@ export function uniswapV2LikeRouterAddress(
|
|||||||
return SPIRITSWAP_ROUTER_BY_CHAIN_ID[chainId];
|
return SPIRITSWAP_ROUTER_BY_CHAIN_ID[chainId];
|
||||||
case ERC20BridgeSource.BiSwap:
|
case ERC20BridgeSource.BiSwap:
|
||||||
return BISWAP_ROUTER_BY_CHAIN_ID[chainId];
|
return BISWAP_ROUTER_BY_CHAIN_ID[chainId];
|
||||||
case ERC20BridgeSource.Yoshi:
|
|
||||||
return YOSHI_ROUTER_BY_CHAIN_ID[chainId];
|
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unknown UniswapV2 like source ${source}`);
|
throw new Error(`Unknown UniswapV2 like source ${source}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import {
|
|||||||
LiquidityProviderRegistry,
|
LiquidityProviderRegistry,
|
||||||
MakerPsmFillData,
|
MakerPsmFillData,
|
||||||
MultiHopFillData,
|
MultiHopFillData,
|
||||||
PlatypusInfo,
|
|
||||||
PsmInfo,
|
PsmInfo,
|
||||||
TokenAdjacencyGraph,
|
TokenAdjacencyGraph,
|
||||||
UniswapV2FillData,
|
UniswapV2FillData,
|
||||||
@@ -183,8 +182,6 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.KyberDmm,
|
ERC20BridgeSource.KyberDmm,
|
||||||
ERC20BridgeSource.AaveV2,
|
ERC20BridgeSource.AaveV2,
|
||||||
ERC20BridgeSource.Synapse,
|
ERC20BridgeSource.Synapse,
|
||||||
ERC20BridgeSource.GMX,
|
|
||||||
ERC20BridgeSource.Platypus,
|
|
||||||
]),
|
]),
|
||||||
[ChainId.Fantom]: new SourceFilters([
|
[ChainId.Fantom]: new SourceFilters([
|
||||||
ERC20BridgeSource.MultiHop,
|
ERC20BridgeSource.MultiHop,
|
||||||
@@ -198,7 +195,6 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.SpookySwap,
|
ERC20BridgeSource.SpookySwap,
|
||||||
ERC20BridgeSource.SushiSwap,
|
ERC20BridgeSource.SushiSwap,
|
||||||
ERC20BridgeSource.Synapse,
|
ERC20BridgeSource.Synapse,
|
||||||
ERC20BridgeSource.Yoshi,
|
|
||||||
]),
|
]),
|
||||||
[ChainId.Celo]: new SourceFilters([
|
[ChainId.Celo]: new SourceFilters([
|
||||||
ERC20BridgeSource.UbeSwap,
|
ERC20BridgeSource.UbeSwap,
|
||||||
@@ -330,8 +326,6 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.KyberDmm,
|
ERC20BridgeSource.KyberDmm,
|
||||||
ERC20BridgeSource.AaveV2,
|
ERC20BridgeSource.AaveV2,
|
||||||
ERC20BridgeSource.Synapse,
|
ERC20BridgeSource.Synapse,
|
||||||
ERC20BridgeSource.GMX,
|
|
||||||
ERC20BridgeSource.Platypus,
|
|
||||||
]),
|
]),
|
||||||
[ChainId.Fantom]: new SourceFilters([
|
[ChainId.Fantom]: new SourceFilters([
|
||||||
ERC20BridgeSource.MultiHop,
|
ERC20BridgeSource.MultiHop,
|
||||||
@@ -345,7 +339,6 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.SpookySwap,
|
ERC20BridgeSource.SpookySwap,
|
||||||
ERC20BridgeSource.SushiSwap,
|
ERC20BridgeSource.SushiSwap,
|
||||||
ERC20BridgeSource.Synapse,
|
ERC20BridgeSource.Synapse,
|
||||||
ERC20BridgeSource.Yoshi,
|
|
||||||
]),
|
]),
|
||||||
[ChainId.Celo]: new SourceFilters([
|
[ChainId.Celo]: new SourceFilters([
|
||||||
ERC20BridgeSource.UbeSwap,
|
ERC20BridgeSource.UbeSwap,
|
||||||
@@ -556,10 +549,8 @@ export const AVALANCHE_TOKENS = {
|
|||||||
DAI: '0xd586e7f844cea2f87f50152665bcbc2c279d8d70',
|
DAI: '0xd586e7f844cea2f87f50152665bcbc2c279d8d70',
|
||||||
// bridged USDC
|
// bridged USDC
|
||||||
USDC: '0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664',
|
USDC: '0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664',
|
||||||
// native USDC on Avalanche usdc.e
|
// native USDC on Avalanche
|
||||||
nUSDC: '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e',
|
nUSDC: '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e',
|
||||||
// usdt.e
|
|
||||||
USDt: '0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7',
|
|
||||||
USDT: '0xc7198437980c041c805a1edcba50c1ce5db95118',
|
USDT: '0xc7198437980c041c805a1edcba50c1ce5db95118',
|
||||||
aDAI: '0x47afa96cdc9fab46904a55a6ad4bf6660b53c38a',
|
aDAI: '0x47afa96cdc9fab46904a55a6ad4bf6660b53c38a',
|
||||||
aUSDC: '0x46a51127c3ce23fb7ab1de06226147f446e4a857',
|
aUSDC: '0x46a51127c3ce23fb7ab1de06226147f446e4a857',
|
||||||
@@ -569,10 +560,6 @@ export const AVALANCHE_TOKENS = {
|
|||||||
aWETH: '0x53f7c5869a859f0aec3d334ee8b4cf01e3492f21',
|
aWETH: '0x53f7c5869a859f0aec3d334ee8b4cf01e3492f21',
|
||||||
MIM: '0x130966628846bfd36ff31a822705796e8cb8c18d',
|
MIM: '0x130966628846bfd36ff31a822705796e8cb8c18d',
|
||||||
MAG: '0x1d60109178C48E4A937D8AB71699D8eBb6F7c5dE',
|
MAG: '0x1d60109178C48E4A937D8AB71699D8eBb6F7c5dE',
|
||||||
sAVAX: '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be',
|
|
||||||
UST: '0xb599c3590f42f8f995ecfa0f85d2980b76862fc1',
|
|
||||||
FRAX: '0xd24c2ad096400b6fbcd2ad8b24e7acbc21a1da64',
|
|
||||||
YUSD: '0x111111111111ed1d73f860f57b2798b683f2d325',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CELO_TOKENS = {
|
export const CELO_TOKENS = {
|
||||||
@@ -835,14 +822,6 @@ export const ACRYPTOS_POOLS = {
|
|||||||
acs3btc: '0xbe7caa236544d1b9a0e7f91e94b9f5bfd3b5ca81',
|
acs3btc: '0xbe7caa236544d1b9a0e7f91e94b9f5bfd3b5ca81',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PLATYPUS_AVALANCHE_POOLS = {
|
|
||||||
usd: '0x66357dcace80431aee0a7507e2e361b7e2402370',
|
|
||||||
yusd: '0xc828d995c686aaba78a4ac89dfc8ec0ff4c5be83',
|
|
||||||
frax: '0xb8e567fc23c39c94a1f6359509d7b43d1fbed824',
|
|
||||||
mim: '0x30c30d826be87cd0a4b90855c2f38f7fcfe4eaa7',
|
|
||||||
sAVAX: '0x4658ea7e9960d6158a261104aaa160cc953bb6ba',
|
|
||||||
};
|
|
||||||
|
|
||||||
export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
|
export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
|
||||||
{
|
{
|
||||||
[ChainId.Mainnet]: [
|
[ChainId.Mainnet]: [
|
||||||
@@ -1813,40 +1792,6 @@ export const ACRYPTOS_BSC_INFOS: { [name: string]: CurveInfo } = {
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PLATYPUS_AVALANCHE_INFOS: { [name: string]: PlatypusInfo } = {
|
|
||||||
[PLATYPUS_AVALANCHE_POOLS.usd]: {
|
|
||||||
poolAddress: PLATYPUS_AVALANCHE_POOLS.usd,
|
|
||||||
tokens: [
|
|
||||||
AVALANCHE_TOKENS.USDT,
|
|
||||||
AVALANCHE_TOKENS.USDC,
|
|
||||||
AVALANCHE_TOKENS.DAI,
|
|
||||||
AVALANCHE_TOKENS.nUSDC,
|
|
||||||
AVALANCHE_TOKENS.USDt,
|
|
||||||
],
|
|
||||||
gasSchedule: 300e3,
|
|
||||||
},
|
|
||||||
[PLATYPUS_AVALANCHE_POOLS.yusd]: {
|
|
||||||
poolAddress: PLATYPUS_AVALANCHE_POOLS.yusd,
|
|
||||||
tokens: [AVALANCHE_TOKENS.YUSD, AVALANCHE_TOKENS.nUSDC],
|
|
||||||
gasSchedule: 300e3,
|
|
||||||
},
|
|
||||||
[PLATYPUS_AVALANCHE_POOLS.frax]: {
|
|
||||||
poolAddress: PLATYPUS_AVALANCHE_POOLS.frax,
|
|
||||||
tokens: [AVALANCHE_TOKENS.FRAX, AVALANCHE_TOKENS.nUSDC],
|
|
||||||
gasSchedule: 300e3,
|
|
||||||
},
|
|
||||||
[PLATYPUS_AVALANCHE_POOLS.mim]: {
|
|
||||||
poolAddress: PLATYPUS_AVALANCHE_POOLS.mim,
|
|
||||||
tokens: [AVALANCHE_TOKENS.MIM, AVALANCHE_TOKENS.nUSDC],
|
|
||||||
gasSchedule: 300e3,
|
|
||||||
},
|
|
||||||
[PLATYPUS_AVALANCHE_POOLS.sAVAX]: {
|
|
||||||
poolAddress: PLATYPUS_AVALANCHE_POOLS.sAVAX,
|
|
||||||
tokens: [AVALANCHE_TOKENS.WAVAX, AVALANCHE_TOKENS.sAVAX],
|
|
||||||
gasSchedule: 300e3,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kyber reserve prefixes
|
* Kyber reserve prefixes
|
||||||
* 0xff Fed price reserve
|
* 0xff Fed price reserve
|
||||||
@@ -2379,41 +2324,6 @@ export const SPOOKYSWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
|
|||||||
NULL_ADDRESS,
|
NULL_ADDRESS,
|
||||||
);
|
);
|
||||||
|
|
||||||
export const GMX_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
|
|
||||||
{
|
|
||||||
[ChainId.Avalanche]: '0x5f719c2f1095f7b9fc68a68e35b51194f4b6abe8',
|
|
||||||
},
|
|
||||||
NULL_ADDRESS,
|
|
||||||
);
|
|
||||||
|
|
||||||
export const GMX_READER_BY_CHAIN_ID = valueByChainId<string>(
|
|
||||||
{
|
|
||||||
[ChainId.Avalanche]: '0x67b789d48c926006f5132bfce4e976f0a7a63d5d',
|
|
||||||
},
|
|
||||||
NULL_ADDRESS,
|
|
||||||
);
|
|
||||||
|
|
||||||
export const GMX_VAULT_BY_CHAIN_ID = valueByChainId<string>(
|
|
||||||
{
|
|
||||||
[ChainId.Avalanche]: '0x9ab2de34a33fb459b538c43f251eb825645e8595',
|
|
||||||
},
|
|
||||||
NULL_ADDRESS,
|
|
||||||
);
|
|
||||||
|
|
||||||
export const PLATYPUS_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
|
|
||||||
{
|
|
||||||
[ChainId.Avalanche]: '0x73256ec7575d999c360c1eec118ecbefd8da7d12',
|
|
||||||
},
|
|
||||||
NULL_ADDRESS,
|
|
||||||
);
|
|
||||||
|
|
||||||
export const YOSHI_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
|
|
||||||
{
|
|
||||||
[ChainId.Fantom]: '0xe4a4642b19c4d0cba965673cd51422b1eda0a78d',
|
|
||||||
},
|
|
||||||
NULL_ADDRESS,
|
|
||||||
);
|
|
||||||
|
|
||||||
export const VIP_ERC20_BRIDGE_SOURCES_BY_CHAIN_ID = valueByChainId<ERC20BridgeSource[]>(
|
export const VIP_ERC20_BRIDGE_SOURCES_BY_CHAIN_ID = valueByChainId<ERC20BridgeSource[]>(
|
||||||
{
|
{
|
||||||
[ChainId.Mainnet]: [
|
[ChainId.Mainnet]: [
|
||||||
@@ -2529,7 +2439,8 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
|
|||||||
return gas;
|
return gas;
|
||||||
},
|
},
|
||||||
[ERC20BridgeSource.KyberDmm]: (fillData?: FillData) => {
|
[ERC20BridgeSource.KyberDmm]: (fillData?: FillData) => {
|
||||||
let gas = 170e3;
|
// TODO: Different base cost if to/from ETH.
|
||||||
|
let gas = 95e3;
|
||||||
const path = (fillData as UniswapV2FillData).tokenAddressPath;
|
const path = (fillData as UniswapV2FillData).tokenAddressPath;
|
||||||
if (path.length > 2) {
|
if (path.length > 2) {
|
||||||
gas += (path.length - 2) * 65e3; // +65k for each hop.
|
gas += (path.length - 2) * 65e3; // +65k for each hop.
|
||||||
@@ -2615,8 +2526,6 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
|
|||||||
//
|
//
|
||||||
[ERC20BridgeSource.Pangolin]: uniswapV2CloneGasSchedule,
|
[ERC20BridgeSource.Pangolin]: uniswapV2CloneGasSchedule,
|
||||||
[ERC20BridgeSource.TraderJoe]: uniswapV2CloneGasSchedule,
|
[ERC20BridgeSource.TraderJoe]: uniswapV2CloneGasSchedule,
|
||||||
[ERC20BridgeSource.GMX]: () => 450e3,
|
|
||||||
[ERC20BridgeSource.Platypus]: () => 450e3,
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Celo
|
// Celo
|
||||||
@@ -2629,7 +2538,6 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
|
|||||||
[ERC20BridgeSource.MorpheusSwap]: uniswapV2CloneGasSchedule,
|
[ERC20BridgeSource.MorpheusSwap]: uniswapV2CloneGasSchedule,
|
||||||
[ERC20BridgeSource.SpiritSwap]: uniswapV2CloneGasSchedule,
|
[ERC20BridgeSource.SpiritSwap]: uniswapV2CloneGasSchedule,
|
||||||
[ERC20BridgeSource.SpookySwap]: uniswapV2CloneGasSchedule,
|
[ERC20BridgeSource.SpookySwap]: uniswapV2CloneGasSchedule,
|
||||||
[ERC20BridgeSource.Yoshi]: uniswapV2CloneGasSchedule,
|
|
||||||
[ERC20BridgeSource.Beethovenx]: () => 100e3,
|
[ERC20BridgeSource.Beethovenx]: () => 100e3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import {
|
|||||||
FinalUniswapV3FillData,
|
FinalUniswapV3FillData,
|
||||||
GeistFillData,
|
GeistFillData,
|
||||||
GenericRouterFillData,
|
GenericRouterFillData,
|
||||||
GMXFillData,
|
|
||||||
KyberDmmFillData,
|
KyberDmmFillData,
|
||||||
KyberFillData,
|
KyberFillData,
|
||||||
LidoFillData,
|
LidoFillData,
|
||||||
@@ -36,7 +35,6 @@ import {
|
|||||||
OptimizedMarketOrder,
|
OptimizedMarketOrder,
|
||||||
OptimizedMarketOrderBase,
|
OptimizedMarketOrderBase,
|
||||||
OrderDomain,
|
OrderDomain,
|
||||||
PlatypusFillData,
|
|
||||||
ShellFillData,
|
ShellFillData,
|
||||||
UniswapV2FillData,
|
UniswapV2FillData,
|
||||||
UniswapV3FillData,
|
UniswapV3FillData,
|
||||||
@@ -195,8 +193,6 @@ export function getErc20BridgeSourceToBridgeSource(source: ERC20BridgeSource): s
|
|||||||
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'SpookySwap');
|
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'SpookySwap');
|
||||||
case ERC20BridgeSource.MorpheusSwap:
|
case ERC20BridgeSource.MorpheusSwap:
|
||||||
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'MorpheusSwap');
|
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'MorpheusSwap');
|
||||||
case ERC20BridgeSource.Yoshi:
|
|
||||||
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'Yoshi');
|
|
||||||
case ERC20BridgeSource.AaveV2:
|
case ERC20BridgeSource.AaveV2:
|
||||||
return encodeBridgeSourceId(BridgeProtocol.AaveV2, 'AaveV2');
|
return encodeBridgeSourceId(BridgeProtocol.AaveV2, 'AaveV2');
|
||||||
case ERC20BridgeSource.Compound:
|
case ERC20BridgeSource.Compound:
|
||||||
@@ -207,10 +203,6 @@ export function getErc20BridgeSourceToBridgeSource(source: ERC20BridgeSource): s
|
|||||||
return encodeBridgeSourceId(BridgeProtocol.Nerve, 'MobiusMoney');
|
return encodeBridgeSourceId(BridgeProtocol.Nerve, 'MobiusMoney');
|
||||||
case ERC20BridgeSource.BiSwap:
|
case ERC20BridgeSource.BiSwap:
|
||||||
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'BiSwap');
|
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'BiSwap');
|
||||||
case ERC20BridgeSource.GMX:
|
|
||||||
return encodeBridgeSourceId(BridgeProtocol.GMX, 'GMX');
|
|
||||||
case ERC20BridgeSource.Platypus:
|
|
||||||
return encodeBridgeSourceId(BridgeProtocol.Platypus, 'Platypus');
|
|
||||||
default:
|
default:
|
||||||
throw new Error(AggregationError.NoBridgeForSource);
|
throw new Error(AggregationError.NoBridgeForSource);
|
||||||
}
|
}
|
||||||
@@ -301,7 +293,6 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
|
|||||||
case ERC20BridgeSource.SpookySwap:
|
case ERC20BridgeSource.SpookySwap:
|
||||||
case ERC20BridgeSource.MorpheusSwap:
|
case ERC20BridgeSource.MorpheusSwap:
|
||||||
case ERC20BridgeSource.BiSwap:
|
case ERC20BridgeSource.BiSwap:
|
||||||
case ERC20BridgeSource.Yoshi:
|
|
||||||
const uniswapV2FillData = (order as OptimizedMarketBridgeOrder<UniswapV2FillData>).fillData;
|
const uniswapV2FillData = (order as OptimizedMarketBridgeOrder<UniswapV2FillData>).fillData;
|
||||||
bridgeData = encoder.encode([uniswapV2FillData.router, uniswapV2FillData.tokenAddressPath]);
|
bridgeData = encoder.encode([uniswapV2FillData.router, uniswapV2FillData.tokenAddressPath]);
|
||||||
break;
|
break;
|
||||||
@@ -374,23 +365,6 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
|
|||||||
const geistFillData = (order as OptimizedMarketBridgeOrder<GeistFillData>).fillData;
|
const geistFillData = (order as OptimizedMarketBridgeOrder<GeistFillData>).fillData;
|
||||||
bridgeData = encoder.encode([geistFillData.lendingPool, geistFillData.gToken]);
|
bridgeData = encoder.encode([geistFillData.lendingPool, geistFillData.gToken]);
|
||||||
break;
|
break;
|
||||||
case ERC20BridgeSource.GMX:
|
|
||||||
const gmxFillData = (order as OptimizedMarketBridgeOrder<GMXFillData>).fillData;
|
|
||||||
bridgeData = encoder.encode([
|
|
||||||
gmxFillData.router,
|
|
||||||
gmxFillData.reader,
|
|
||||||
gmxFillData.vault,
|
|
||||||
gmxFillData.tokenAddressPath,
|
|
||||||
]);
|
|
||||||
break;
|
|
||||||
case ERC20BridgeSource.Platypus:
|
|
||||||
const platypusFillData = (order as OptimizedMarketBridgeOrder<PlatypusFillData>).fillData;
|
|
||||||
bridgeData = encoder.encode([
|
|
||||||
platypusFillData.router,
|
|
||||||
platypusFillData.pool,
|
|
||||||
platypusFillData.tokenAddressPath,
|
|
||||||
]);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error(AggregationError.NoBridgeForSource);
|
throw new Error(AggregationError.NoBridgeForSource);
|
||||||
@@ -477,8 +451,6 @@ const balancerV2Encoder = AbiEncoder.create([
|
|||||||
]);
|
]);
|
||||||
const routerAddressPathEncoder = AbiEncoder.create('(address,address[])');
|
const routerAddressPathEncoder = AbiEncoder.create('(address,address[])');
|
||||||
const tokenAddressEncoder = AbiEncoder.create([{ name: 'tokenAddress', type: 'address' }]);
|
const tokenAddressEncoder = AbiEncoder.create([{ name: 'tokenAddress', type: 'address' }]);
|
||||||
const gmxAddressPathEncoder = AbiEncoder.create('(address,address,address,address[])');
|
|
||||||
const platypusAddressPathEncoder = AbiEncoder.create('(address,address[],address[])');
|
|
||||||
|
|
||||||
export const BRIDGE_ENCODERS: {
|
export const BRIDGE_ENCODERS: {
|
||||||
[key in Exclude<
|
[key in Exclude<
|
||||||
@@ -529,10 +501,6 @@ export const BRIDGE_ENCODERS: {
|
|||||||
[ERC20BridgeSource.SpookySwap]: routerAddressPathEncoder,
|
[ERC20BridgeSource.SpookySwap]: routerAddressPathEncoder,
|
||||||
[ERC20BridgeSource.MorpheusSwap]: routerAddressPathEncoder,
|
[ERC20BridgeSource.MorpheusSwap]: routerAddressPathEncoder,
|
||||||
[ERC20BridgeSource.BiSwap]: routerAddressPathEncoder,
|
[ERC20BridgeSource.BiSwap]: routerAddressPathEncoder,
|
||||||
[ERC20BridgeSource.Yoshi]: routerAddressPathEncoder,
|
|
||||||
// Avalanche
|
|
||||||
[ERC20BridgeSource.GMX]: gmxAddressPathEncoder,
|
|
||||||
[ERC20BridgeSource.Platypus]: platypusAddressPathEncoder,
|
|
||||||
// Celo
|
// Celo
|
||||||
[ERC20BridgeSource.UbeSwap]: routerAddressPathEncoder,
|
[ERC20BridgeSource.UbeSwap]: routerAddressPathEncoder,
|
||||||
// BSC
|
// BSC
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import {
|
|||||||
getCurveLikeInfosForPair,
|
getCurveLikeInfosForPair,
|
||||||
getDodoV2Offsets,
|
getDodoV2Offsets,
|
||||||
getKyberOffsets,
|
getKyberOffsets,
|
||||||
getPlatypusInfoForPair,
|
|
||||||
getShellLikeInfosForPair,
|
getShellLikeInfosForPair,
|
||||||
isAllowedKyberReserveId,
|
isAllowedKyberReserveId,
|
||||||
isBadTokenForSource,
|
isBadTokenForSource,
|
||||||
@@ -24,7 +23,6 @@ import {
|
|||||||
import { CompoundCTokenCache } from './compound_ctoken_cache';
|
import { CompoundCTokenCache } from './compound_ctoken_cache';
|
||||||
import {
|
import {
|
||||||
AAVE_V2_SUBGRAPH_URL_BY_CHAIN_ID,
|
AAVE_V2_SUBGRAPH_URL_BY_CHAIN_ID,
|
||||||
AVALANCHE_TOKENS,
|
|
||||||
BALANCER_V2_VAULT_ADDRESS_BY_CHAIN,
|
BALANCER_V2_VAULT_ADDRESS_BY_CHAIN,
|
||||||
BANCOR_REGISTRY_BY_CHAIN_ID,
|
BANCOR_REGISTRY_BY_CHAIN_ID,
|
||||||
BEETHOVEN_X_SUBGRAPH_URL_BY_CHAIN,
|
BEETHOVEN_X_SUBGRAPH_URL_BY_CHAIN,
|
||||||
@@ -32,9 +30,6 @@ import {
|
|||||||
COMPOUND_API_URL_BY_CHAIN_ID,
|
COMPOUND_API_URL_BY_CHAIN_ID,
|
||||||
DODOV1_CONFIG_BY_CHAIN_ID,
|
DODOV1_CONFIG_BY_CHAIN_ID,
|
||||||
DODOV2_FACTORIES_BY_CHAIN_ID,
|
DODOV2_FACTORIES_BY_CHAIN_ID,
|
||||||
GMX_READER_BY_CHAIN_ID,
|
|
||||||
GMX_ROUTER_BY_CHAIN_ID,
|
|
||||||
GMX_VAULT_BY_CHAIN_ID,
|
|
||||||
KYBER_CONFIG_BY_CHAIN_ID,
|
KYBER_CONFIG_BY_CHAIN_ID,
|
||||||
KYBER_DMM_ROUTER_BY_CHAIN_ID,
|
KYBER_DMM_ROUTER_BY_CHAIN_ID,
|
||||||
LIDO_INFO_BY_CHAIN,
|
LIDO_INFO_BY_CHAIN,
|
||||||
@@ -45,7 +40,6 @@ import {
|
|||||||
NATIVE_FEE_TOKEN_BY_CHAIN_ID,
|
NATIVE_FEE_TOKEN_BY_CHAIN_ID,
|
||||||
NULL_ADDRESS,
|
NULL_ADDRESS,
|
||||||
NULL_BYTES,
|
NULL_BYTES,
|
||||||
PLATYPUS_ROUTER_BY_CHAIN_ID,
|
|
||||||
SELL_SOURCE_FILTER_BY_CHAIN_ID,
|
SELL_SOURCE_FILTER_BY_CHAIN_ID,
|
||||||
UNISWAPV1_ROUTER_BY_CHAIN_ID,
|
UNISWAPV1_ROUTER_BY_CHAIN_ID,
|
||||||
UNISWAPV3_CONFIG_BY_CHAIN_ID,
|
UNISWAPV3_CONFIG_BY_CHAIN_ID,
|
||||||
@@ -78,7 +72,6 @@ import {
|
|||||||
GeistFillData,
|
GeistFillData,
|
||||||
GeistInfo,
|
GeistInfo,
|
||||||
GenericRouterFillData,
|
GenericRouterFillData,
|
||||||
GMXFillData,
|
|
||||||
HopInfo,
|
HopInfo,
|
||||||
KyberDmmFillData,
|
KyberDmmFillData,
|
||||||
KyberFillData,
|
KyberFillData,
|
||||||
@@ -90,7 +83,6 @@ import {
|
|||||||
MakerPsmFillData,
|
MakerPsmFillData,
|
||||||
MooniswapFillData,
|
MooniswapFillData,
|
||||||
MultiHopFillData,
|
MultiHopFillData,
|
||||||
PlatypusFillData,
|
|
||||||
PsmInfo,
|
PsmInfo,
|
||||||
ShellFillData,
|
ShellFillData,
|
||||||
SourceQuoteOperation,
|
SourceQuoteOperation,
|
||||||
@@ -1273,66 +1265,6 @@ export class SamplerOperations {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public getGMXSellQuotes(
|
|
||||||
router: string,
|
|
||||||
reader: string,
|
|
||||||
vault: string,
|
|
||||||
tokenAddressPath: string[],
|
|
||||||
takerFillAmounts: BigNumber[],
|
|
||||||
): SourceQuoteOperation<GMXFillData> {
|
|
||||||
return new SamplerContractOperation({
|
|
||||||
source: ERC20BridgeSource.GMX,
|
|
||||||
fillData: { router, reader, vault, tokenAddressPath },
|
|
||||||
contract: this._samplerContract,
|
|
||||||
function: this._samplerContract.sampleSellsFromGMX,
|
|
||||||
params: [reader, vault, tokenAddressPath, takerFillAmounts],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public getGMXBuyQuotes(
|
|
||||||
router: string,
|
|
||||||
reader: string,
|
|
||||||
vault: string,
|
|
||||||
tokenAddressPath: string[],
|
|
||||||
makerFillAmounts: BigNumber[],
|
|
||||||
): SourceQuoteOperation<GMXFillData> {
|
|
||||||
return new SamplerContractOperation({
|
|
||||||
source: ERC20BridgeSource.GMX,
|
|
||||||
fillData: { router, reader, vault, tokenAddressPath },
|
|
||||||
contract: this._samplerContract,
|
|
||||||
function: this._samplerContract.sampleBuysFromGMX,
|
|
||||||
params: [reader, vault, tokenAddressPath, makerFillAmounts],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public getPlatypusSellQuotes(
|
|
||||||
router: string,
|
|
||||||
pool: string[],
|
|
||||||
tokenAddressPath: string[],
|
|
||||||
takerFillAmounts: BigNumber[],
|
|
||||||
): SourceQuoteOperation<PlatypusFillData> {
|
|
||||||
return new SamplerContractOperation({
|
|
||||||
source: ERC20BridgeSource.Platypus,
|
|
||||||
fillData: { router, pool, tokenAddressPath },
|
|
||||||
contract: this._samplerContract,
|
|
||||||
function: this._samplerContract.sampleSellsFromPlatypus,
|
|
||||||
params: [pool[0], tokenAddressPath, takerFillAmounts],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public getPlatypusBuyQuotes(
|
|
||||||
router: string,
|
|
||||||
pool: string[],
|
|
||||||
tokenAddressPath: string[],
|
|
||||||
makerFillAmounts: BigNumber[],
|
|
||||||
): SourceQuoteOperation<PlatypusFillData> {
|
|
||||||
return new SamplerContractOperation({
|
|
||||||
source: ERC20BridgeSource.Platypus,
|
|
||||||
fillData: { router, pool, tokenAddressPath },
|
|
||||||
contract: this._samplerContract,
|
|
||||||
function: this._samplerContract.sampleBuysFromPlatypus,
|
|
||||||
params: [pool[0], tokenAddressPath, makerFillAmounts],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public getMedianSellRate(
|
public getMedianSellRate(
|
||||||
sources: ERC20BridgeSource[],
|
sources: ERC20BridgeSource[],
|
||||||
makerToken: string,
|
makerToken: string,
|
||||||
@@ -1462,7 +1394,6 @@ export class SamplerOperations {
|
|||||||
case ERC20BridgeSource.UbeSwap:
|
case ERC20BridgeSource.UbeSwap:
|
||||||
case ERC20BridgeSource.SpiritSwap:
|
case ERC20BridgeSource.SpiritSwap:
|
||||||
case ERC20BridgeSource.SpookySwap:
|
case ERC20BridgeSource.SpookySwap:
|
||||||
case ERC20BridgeSource.Yoshi:
|
|
||||||
case ERC20BridgeSource.MorpheusSwap:
|
case ERC20BridgeSource.MorpheusSwap:
|
||||||
case ERC20BridgeSource.BiSwap:
|
case ERC20BridgeSource.BiSwap:
|
||||||
const uniLikeRouter = uniswapV2LikeRouterAddress(this.chainId, source);
|
const uniLikeRouter = uniswapV2LikeRouterAddress(this.chainId, source);
|
||||||
@@ -1718,29 +1649,6 @@ export class SamplerOperations {
|
|||||||
takerFillAmounts,
|
takerFillAmounts,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case ERC20BridgeSource.GMX: {
|
|
||||||
// low liquidity mim pool dont quote
|
|
||||||
if (takerToken === AVALANCHE_TOKENS.MIM || makerToken === 'AVALANCHE_TOKENS.MIM') {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
return this.getGMXSellQuotes(
|
|
||||||
GMX_ROUTER_BY_CHAIN_ID[this.chainId],
|
|
||||||
GMX_READER_BY_CHAIN_ID[this.chainId],
|
|
||||||
GMX_VAULT_BY_CHAIN_ID[this.chainId],
|
|
||||||
[takerToken, makerToken],
|
|
||||||
takerFillAmounts,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
case ERC20BridgeSource.Platypus: {
|
|
||||||
return getPlatypusInfoForPair(this.chainId, takerToken, makerToken).map(pool =>
|
|
||||||
this.getPlatypusSellQuotes(
|
|
||||||
PLATYPUS_ROUTER_BY_CHAIN_ID[this.chainId],
|
|
||||||
[pool.poolAddress],
|
|
||||||
[takerToken, makerToken],
|
|
||||||
takerFillAmounts,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported sell sample source: ${source}`);
|
throw new Error(`Unsupported sell sample source: ${source}`);
|
||||||
}
|
}
|
||||||
@@ -1793,7 +1701,6 @@ export class SamplerOperations {
|
|||||||
case ERC20BridgeSource.UbeSwap:
|
case ERC20BridgeSource.UbeSwap:
|
||||||
case ERC20BridgeSource.SpiritSwap:
|
case ERC20BridgeSource.SpiritSwap:
|
||||||
case ERC20BridgeSource.SpookySwap:
|
case ERC20BridgeSource.SpookySwap:
|
||||||
case ERC20BridgeSource.Yoshi:
|
|
||||||
case ERC20BridgeSource.MorpheusSwap:
|
case ERC20BridgeSource.MorpheusSwap:
|
||||||
case ERC20BridgeSource.BiSwap:
|
case ERC20BridgeSource.BiSwap:
|
||||||
const uniLikeRouter = uniswapV2LikeRouterAddress(this.chainId, source);
|
const uniLikeRouter = uniswapV2LikeRouterAddress(this.chainId, source);
|
||||||
@@ -2044,29 +1951,6 @@ export class SamplerOperations {
|
|||||||
}
|
}
|
||||||
return this.getCompoundBuyQuotes(cToken.tokenAddress, makerToken, takerToken, makerFillAmounts);
|
return this.getCompoundBuyQuotes(cToken.tokenAddress, makerToken, takerToken, makerFillAmounts);
|
||||||
}
|
}
|
||||||
case ERC20BridgeSource.GMX: {
|
|
||||||
// bad mim pool dont quote
|
|
||||||
if (takerToken === 'AVALANCHE_TOKENS.MIM' || makerToken === 'AVALANCHE_TOKENS.MIM') {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
return this.getGMXBuyQuotes(
|
|
||||||
GMX_ROUTER_BY_CHAIN_ID[this.chainId],
|
|
||||||
GMX_READER_BY_CHAIN_ID[this.chainId],
|
|
||||||
GMX_VAULT_BY_CHAIN_ID[this.chainId],
|
|
||||||
[takerToken, makerToken],
|
|
||||||
makerFillAmounts,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
case ERC20BridgeSource.Platypus: {
|
|
||||||
return getPlatypusInfoForPair(this.chainId, takerToken, makerToken).map(pool =>
|
|
||||||
this.getPlatypusBuyQuotes(
|
|
||||||
PLATYPUS_ROUTER_BY_CHAIN_ID[this.chainId],
|
|
||||||
[pool.poolAddress],
|
|
||||||
[takerToken, makerToken],
|
|
||||||
makerFillAmounts,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported buy sample source: ${source}`);
|
throw new Error(`Unsupported buy sample source: ${source}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,9 +92,6 @@ export enum ERC20BridgeSource {
|
|||||||
// Avalanche
|
// Avalanche
|
||||||
Pangolin = 'Pangolin',
|
Pangolin = 'Pangolin',
|
||||||
TraderJoe = 'TraderJoe',
|
TraderJoe = 'TraderJoe',
|
||||||
Platypus = 'Platypus',
|
|
||||||
// tslint:disable: enum-naming
|
|
||||||
GMX = 'GMX',
|
|
||||||
// Celo only
|
// Celo only
|
||||||
UbeSwap = 'UbeSwap',
|
UbeSwap = 'UbeSwap',
|
||||||
MobiusMoney = 'MobiusMoney',
|
MobiusMoney = 'MobiusMoney',
|
||||||
@@ -103,7 +100,6 @@ export enum ERC20BridgeSource {
|
|||||||
SpookySwap = 'SpookySwap',
|
SpookySwap = 'SpookySwap',
|
||||||
Beethovenx = 'Beethovenx',
|
Beethovenx = 'Beethovenx',
|
||||||
MorpheusSwap = 'MorpheusSwap',
|
MorpheusSwap = 'MorpheusSwap',
|
||||||
Yoshi = 'Yoshi',
|
|
||||||
Geist = 'Geist',
|
Geist = 'Geist',
|
||||||
}
|
}
|
||||||
export type SourcesWithPoolsCache =
|
export type SourcesWithPoolsCache =
|
||||||
@@ -355,24 +351,6 @@ export interface GeistFillData extends FillData {
|
|||||||
takerToken: string;
|
takerToken: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PlatypusInfo {
|
|
||||||
poolAddress: string;
|
|
||||||
tokens: string[];
|
|
||||||
gasSchedule: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GMXFillData extends FillData {
|
|
||||||
router: string;
|
|
||||||
reader: string;
|
|
||||||
vault: string;
|
|
||||||
tokenAddressPath: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PlatypusFillData extends FillData {
|
|
||||||
router: string;
|
|
||||||
pool: string[];
|
|
||||||
tokenAddressPath: string[];
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Represents a node on a fill path.
|
* Represents a node on a fill path.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -18,17 +18,14 @@ import * as DODOSampler from '../test/generated-artifacts/DODOSampler.json';
|
|||||||
import * as DODOV2Sampler from '../test/generated-artifacts/DODOV2Sampler.json';
|
import * as DODOV2Sampler from '../test/generated-artifacts/DODOV2Sampler.json';
|
||||||
import * as ERC20BridgeSampler from '../test/generated-artifacts/ERC20BridgeSampler.json';
|
import * as ERC20BridgeSampler from '../test/generated-artifacts/ERC20BridgeSampler.json';
|
||||||
import * as FakeTaker from '../test/generated-artifacts/FakeTaker.json';
|
import * as FakeTaker from '../test/generated-artifacts/FakeTaker.json';
|
||||||
import * as GMXSampler from '../test/generated-artifacts/GMXSampler.json';
|
|
||||||
import * as IBalancer from '../test/generated-artifacts/IBalancer.json';
|
import * as IBalancer from '../test/generated-artifacts/IBalancer.json';
|
||||||
import * as IBalancerV2Vault from '../test/generated-artifacts/IBalancerV2Vault.json';
|
import * as IBalancerV2Vault from '../test/generated-artifacts/IBalancerV2Vault.json';
|
||||||
import * as IBancor from '../test/generated-artifacts/IBancor.json';
|
import * as IBancor from '../test/generated-artifacts/IBancor.json';
|
||||||
import * as ICurve from '../test/generated-artifacts/ICurve.json';
|
import * as ICurve from '../test/generated-artifacts/ICurve.json';
|
||||||
import * as IGMX from '../test/generated-artifacts/IGMX.json';
|
|
||||||
import * as IKyberNetwork from '../test/generated-artifacts/IKyberNetwork.json';
|
import * as IKyberNetwork from '../test/generated-artifacts/IKyberNetwork.json';
|
||||||
import * as IMooniswap from '../test/generated-artifacts/IMooniswap.json';
|
import * as IMooniswap from '../test/generated-artifacts/IMooniswap.json';
|
||||||
import * as IMStable from '../test/generated-artifacts/IMStable.json';
|
import * as IMStable from '../test/generated-artifacts/IMStable.json';
|
||||||
import * as IMultiBridge from '../test/generated-artifacts/IMultiBridge.json';
|
import * as IMultiBridge from '../test/generated-artifacts/IMultiBridge.json';
|
||||||
import * as IPlatypus from '../test/generated-artifacts/IPlatypus.json';
|
|
||||||
import * as IShell from '../test/generated-artifacts/IShell.json';
|
import * as IShell from '../test/generated-artifacts/IShell.json';
|
||||||
import * as ISmoothy from '../test/generated-artifacts/ISmoothy.json';
|
import * as ISmoothy from '../test/generated-artifacts/ISmoothy.json';
|
||||||
import * as IUniswapExchangeQuotes from '../test/generated-artifacts/IUniswapExchangeQuotes.json';
|
import * as IUniswapExchangeQuotes from '../test/generated-artifacts/IUniswapExchangeQuotes.json';
|
||||||
@@ -41,7 +38,6 @@ import * as MakerPSMSampler from '../test/generated-artifacts/MakerPSMSampler.js
|
|||||||
import * as MooniswapSampler from '../test/generated-artifacts/MooniswapSampler.json';
|
import * as MooniswapSampler from '../test/generated-artifacts/MooniswapSampler.json';
|
||||||
import * as MStableSampler from '../test/generated-artifacts/MStableSampler.json';
|
import * as MStableSampler from '../test/generated-artifacts/MStableSampler.json';
|
||||||
import * as NativeOrderSampler from '../test/generated-artifacts/NativeOrderSampler.json';
|
import * as NativeOrderSampler from '../test/generated-artifacts/NativeOrderSampler.json';
|
||||||
import * as PlatypusSampler from '../test/generated-artifacts/PlatypusSampler.json';
|
|
||||||
import * as SamplerUtils from '../test/generated-artifacts/SamplerUtils.json';
|
import * as SamplerUtils from '../test/generated-artifacts/SamplerUtils.json';
|
||||||
import * as ShellSampler from '../test/generated-artifacts/ShellSampler.json';
|
import * as ShellSampler from '../test/generated-artifacts/ShellSampler.json';
|
||||||
import * as SmoothySampler from '../test/generated-artifacts/SmoothySampler.json';
|
import * as SmoothySampler from '../test/generated-artifacts/SmoothySampler.json';
|
||||||
@@ -65,7 +61,6 @@ export const artifacts = {
|
|||||||
DODOV2Sampler: DODOV2Sampler as ContractArtifact,
|
DODOV2Sampler: DODOV2Sampler as ContractArtifact,
|
||||||
ERC20BridgeSampler: ERC20BridgeSampler as ContractArtifact,
|
ERC20BridgeSampler: ERC20BridgeSampler as ContractArtifact,
|
||||||
FakeTaker: FakeTaker as ContractArtifact,
|
FakeTaker: FakeTaker as ContractArtifact,
|
||||||
GMXSampler: GMXSampler as ContractArtifact,
|
|
||||||
KyberDmmSampler: KyberDmmSampler as ContractArtifact,
|
KyberDmmSampler: KyberDmmSampler as ContractArtifact,
|
||||||
KyberSampler: KyberSampler as ContractArtifact,
|
KyberSampler: KyberSampler as ContractArtifact,
|
||||||
LidoSampler: LidoSampler as ContractArtifact,
|
LidoSampler: LidoSampler as ContractArtifact,
|
||||||
@@ -74,7 +69,6 @@ export const artifacts = {
|
|||||||
MakerPSMSampler: MakerPSMSampler as ContractArtifact,
|
MakerPSMSampler: MakerPSMSampler as ContractArtifact,
|
||||||
MooniswapSampler: MooniswapSampler as ContractArtifact,
|
MooniswapSampler: MooniswapSampler as ContractArtifact,
|
||||||
NativeOrderSampler: NativeOrderSampler as ContractArtifact,
|
NativeOrderSampler: NativeOrderSampler as ContractArtifact,
|
||||||
PlatypusSampler: PlatypusSampler as ContractArtifact,
|
|
||||||
SamplerUtils: SamplerUtils as ContractArtifact,
|
SamplerUtils: SamplerUtils as ContractArtifact,
|
||||||
ShellSampler: ShellSampler as ContractArtifact,
|
ShellSampler: ShellSampler as ContractArtifact,
|
||||||
SmoothySampler: SmoothySampler as ContractArtifact,
|
SmoothySampler: SmoothySampler as ContractArtifact,
|
||||||
@@ -87,12 +81,10 @@ export const artifacts = {
|
|||||||
IBalancerV2Vault: IBalancerV2Vault as ContractArtifact,
|
IBalancerV2Vault: IBalancerV2Vault as ContractArtifact,
|
||||||
IBancor: IBancor as ContractArtifact,
|
IBancor: IBancor as ContractArtifact,
|
||||||
ICurve: ICurve as ContractArtifact,
|
ICurve: ICurve as ContractArtifact,
|
||||||
IGMX: IGMX as ContractArtifact,
|
|
||||||
IKyberNetwork: IKyberNetwork as ContractArtifact,
|
IKyberNetwork: IKyberNetwork as ContractArtifact,
|
||||||
IMStable: IMStable as ContractArtifact,
|
IMStable: IMStable as ContractArtifact,
|
||||||
IMooniswap: IMooniswap as ContractArtifact,
|
IMooniswap: IMooniswap as ContractArtifact,
|
||||||
IMultiBridge: IMultiBridge as ContractArtifact,
|
IMultiBridge: IMultiBridge as ContractArtifact,
|
||||||
IPlatypus: IPlatypus as ContractArtifact,
|
|
||||||
IShell: IShell as ContractArtifact,
|
IShell: IShell as ContractArtifact,
|
||||||
ISmoothy: ISmoothy as ContractArtifact,
|
ISmoothy: ISmoothy as ContractArtifact,
|
||||||
IUniswapExchangeQuotes: IUniswapExchangeQuotes as ContractArtifact,
|
IUniswapExchangeQuotes: IUniswapExchangeQuotes as ContractArtifact,
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export * from '../test/generated-wrappers/d_o_d_o_sampler';
|
|||||||
export * from '../test/generated-wrappers/d_o_d_o_v2_sampler';
|
export * from '../test/generated-wrappers/d_o_d_o_v2_sampler';
|
||||||
export * from '../test/generated-wrappers/erc20_bridge_sampler';
|
export * from '../test/generated-wrappers/erc20_bridge_sampler';
|
||||||
export * from '../test/generated-wrappers/fake_taker';
|
export * from '../test/generated-wrappers/fake_taker';
|
||||||
export * from '../test/generated-wrappers/g_m_x_sampler';
|
|
||||||
export * from '../test/generated-wrappers/i_balancer';
|
export * from '../test/generated-wrappers/i_balancer';
|
||||||
export * from '../test/generated-wrappers/i_balancer_v2_vault';
|
export * from '../test/generated-wrappers/i_balancer_v2_vault';
|
||||||
export * from '../test/generated-wrappers/i_bancor';
|
export * from '../test/generated-wrappers/i_bancor';
|
||||||
@@ -25,12 +24,10 @@ export * from '../test/generated-wrappers/i_kyber_network';
|
|||||||
export * from '../test/generated-wrappers/i_m_stable';
|
export * from '../test/generated-wrappers/i_m_stable';
|
||||||
export * from '../test/generated-wrappers/i_mooniswap';
|
export * from '../test/generated-wrappers/i_mooniswap';
|
||||||
export * from '../test/generated-wrappers/i_multi_bridge';
|
export * from '../test/generated-wrappers/i_multi_bridge';
|
||||||
export * from '../test/generated-wrappers/i_platypus';
|
|
||||||
export * from '../test/generated-wrappers/i_shell';
|
export * from '../test/generated-wrappers/i_shell';
|
||||||
export * from '../test/generated-wrappers/i_smoothy';
|
export * from '../test/generated-wrappers/i_smoothy';
|
||||||
export * from '../test/generated-wrappers/i_uniswap_exchange_quotes';
|
export * from '../test/generated-wrappers/i_uniswap_exchange_quotes';
|
||||||
export * from '../test/generated-wrappers/i_uniswap_v2_router01';
|
export * from '../test/generated-wrappers/i_uniswap_v2_router01';
|
||||||
export * from '../test/generated-wrappers/igmx';
|
|
||||||
export * from '../test/generated-wrappers/kyber_dmm_sampler';
|
export * from '../test/generated-wrappers/kyber_dmm_sampler';
|
||||||
export * from '../test/generated-wrappers/kyber_sampler';
|
export * from '../test/generated-wrappers/kyber_sampler';
|
||||||
export * from '../test/generated-wrappers/lido_sampler';
|
export * from '../test/generated-wrappers/lido_sampler';
|
||||||
@@ -39,7 +36,6 @@ export * from '../test/generated-wrappers/m_stable_sampler';
|
|||||||
export * from '../test/generated-wrappers/maker_p_s_m_sampler';
|
export * from '../test/generated-wrappers/maker_p_s_m_sampler';
|
||||||
export * from '../test/generated-wrappers/mooniswap_sampler';
|
export * from '../test/generated-wrappers/mooniswap_sampler';
|
||||||
export * from '../test/generated-wrappers/native_order_sampler';
|
export * from '../test/generated-wrappers/native_order_sampler';
|
||||||
export * from '../test/generated-wrappers/platypus_sampler';
|
|
||||||
export * from '../test/generated-wrappers/sampler_utils';
|
export * from '../test/generated-wrappers/sampler_utils';
|
||||||
export * from '../test/generated-wrappers/shell_sampler';
|
export * from '../test/generated-wrappers/shell_sampler';
|
||||||
export * from '../test/generated-wrappers/smoothy_sampler';
|
export * from '../test/generated-wrappers/smoothy_sampler';
|
||||||
|
|||||||
@@ -19,17 +19,14 @@
|
|||||||
"test/generated-artifacts/DODOV2Sampler.json",
|
"test/generated-artifacts/DODOV2Sampler.json",
|
||||||
"test/generated-artifacts/ERC20BridgeSampler.json",
|
"test/generated-artifacts/ERC20BridgeSampler.json",
|
||||||
"test/generated-artifacts/FakeTaker.json",
|
"test/generated-artifacts/FakeTaker.json",
|
||||||
"test/generated-artifacts/GMXSampler.json",
|
|
||||||
"test/generated-artifacts/IBalancer.json",
|
"test/generated-artifacts/IBalancer.json",
|
||||||
"test/generated-artifacts/IBalancerV2Vault.json",
|
"test/generated-artifacts/IBalancerV2Vault.json",
|
||||||
"test/generated-artifacts/IBancor.json",
|
"test/generated-artifacts/IBancor.json",
|
||||||
"test/generated-artifacts/ICurve.json",
|
"test/generated-artifacts/ICurve.json",
|
||||||
"test/generated-artifacts/IGMX.json",
|
|
||||||
"test/generated-artifacts/IKyberNetwork.json",
|
"test/generated-artifacts/IKyberNetwork.json",
|
||||||
"test/generated-artifacts/IMStable.json",
|
"test/generated-artifacts/IMStable.json",
|
||||||
"test/generated-artifacts/IMooniswap.json",
|
"test/generated-artifacts/IMooniswap.json",
|
||||||
"test/generated-artifacts/IMultiBridge.json",
|
"test/generated-artifacts/IMultiBridge.json",
|
||||||
"test/generated-artifacts/IPlatypus.json",
|
|
||||||
"test/generated-artifacts/IShell.json",
|
"test/generated-artifacts/IShell.json",
|
||||||
"test/generated-artifacts/ISmoothy.json",
|
"test/generated-artifacts/ISmoothy.json",
|
||||||
"test/generated-artifacts/IUniswapExchangeQuotes.json",
|
"test/generated-artifacts/IUniswapExchangeQuotes.json",
|
||||||
@@ -42,7 +39,6 @@
|
|||||||
"test/generated-artifacts/MakerPSMSampler.json",
|
"test/generated-artifacts/MakerPSMSampler.json",
|
||||||
"test/generated-artifacts/MooniswapSampler.json",
|
"test/generated-artifacts/MooniswapSampler.json",
|
||||||
"test/generated-artifacts/NativeOrderSampler.json",
|
"test/generated-artifacts/NativeOrderSampler.json",
|
||||||
"test/generated-artifacts/PlatypusSampler.json",
|
|
||||||
"test/generated-artifacts/SamplerUtils.json",
|
"test/generated-artifacts/SamplerUtils.json",
|
||||||
"test/generated-artifacts/ShellSampler.json",
|
"test/generated-artifacts/ShellSampler.json",
|
||||||
"test/generated-artifacts/SmoothySampler.json",
|
"test/generated-artifacts/SmoothySampler.json",
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"version": "6.14.0",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Redeploy FQT on Avalanche and BSC"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1652919697
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"version": "6.13.0",
|
"version": "6.13.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v6.14.0 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Redeploy FQT on Avalanche and BSC
|
|
||||||
|
|
||||||
## v6.13.0 - _April 22, 2022_
|
## v6.13.0 - _April 22, 2022_
|
||||||
|
|
||||||
* Redeploy FQT on mainnet and polygon (#462)
|
* Redeploy FQT on mainnet and polygon (#462)
|
||||||
|
|||||||
@@ -205,7 +205,7 @@
|
|||||||
"wethTransformer": "0xac3d95668c092e895cd83a9cbafe9c7d9906471f",
|
"wethTransformer": "0xac3d95668c092e895cd83a9cbafe9c7d9906471f",
|
||||||
"payTakerTransformer": "0x4f5e8ca2cadecd4a467ae441e4b03de4278a4574",
|
"payTakerTransformer": "0x4f5e8ca2cadecd4a467ae441e4b03de4278a4574",
|
||||||
"affiliateFeeTransformer": "0x1be34ab9b2acb5c4ddd89454bdce637967e65230",
|
"affiliateFeeTransformer": "0x1be34ab9b2acb5c4ddd89454bdce637967e65230",
|
||||||
"fillQuoteTransformer": "0x0b72d55485e8d877f73cc8b14ea3e010b3e804fd",
|
"fillQuoteTransformer": "0xfa8ca57cb24cd59e74ae1659a00104188e7e8a3e",
|
||||||
"positiveSlippageFeeTransformer": "0x7f5c79ad1788573b1145f4651a248523c54f5d1f"
|
"positiveSlippageFeeTransformer": "0x7f5c79ad1788573b1145f4651a248523c54f5d1f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -373,7 +373,7 @@
|
|||||||
"wethTransformer": "0x9b8b52391071d71cd4ad1e61d7f273268fa34c6c",
|
"wethTransformer": "0x9b8b52391071d71cd4ad1e61d7f273268fa34c6c",
|
||||||
"payTakerTransformer": "0x898c6fde239d646c73f0a57e3570b6f86a3d62a3",
|
"payTakerTransformer": "0x898c6fde239d646c73f0a57e3570b6f86a3d62a3",
|
||||||
"affiliateFeeTransformer": "0x34617b855411e52fbc05899435f44cbd0503022c",
|
"affiliateFeeTransformer": "0x34617b855411e52fbc05899435f44cbd0503022c",
|
||||||
"fillQuoteTransformer": "0xb6c9c52ce7094fc96d8bd5d3ecd0c6feeafe3457",
|
"fillQuoteTransformer": "0xd421f50b3ae27f223aa35a04944236d257235412",
|
||||||
"positiveSlippageFeeTransformer": "0x470ba89da18a6db6e8a0567b3c9214b960861857"
|
"positiveSlippageFeeTransformer": "0x470ba89da18a6db6e8a0567b3c9214b960861857"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contract-addresses",
|
"name": "@0x/contract-addresses",
|
||||||
"version": "6.14.0",
|
"version": "6.13.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"timestamp": 1652919697,
|
|
||||||
"version": "13.20.2",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1650611093,
|
"timestamp": 1650611093,
|
||||||
"version": "13.20.1",
|
"version": "13.20.1",
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v13.20.2 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v13.20.1 - _April 22, 2022_
|
## v13.20.1 - _April 22, 2022_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contract-wrappers",
|
"name": "@0x/contract-wrappers",
|
||||||
"version": "13.20.2",
|
"version": "13.20.1",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.34",
|
"@0x/assert": "^3.0.34",
|
||||||
"@0x/base-contract": "^6.5.0",
|
"@0x/base-contract": "^6.5.0",
|
||||||
"@0x/contract-addresses": "^6.14.0",
|
"@0x/contract-addresses": "^6.13.0",
|
||||||
"@0x/json-schemas": "^6.4.4",
|
"@0x/json-schemas": "^6.4.4",
|
||||||
"@0x/types": "^3.3.6",
|
"@0x/types": "^3.3.6",
|
||||||
"@0x/utils": "^6.5.3",
|
"@0x/utils": "^6.5.3",
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"timestamp": 1652919697,
|
|
||||||
"version": "8.1.19",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1650611093,
|
"timestamp": 1650611093,
|
||||||
"version": "8.1.18",
|
"version": "8.1.18",
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v8.1.19 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v8.1.18 - _April 22, 2022_
|
## v8.1.18 - _April 22, 2022_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/migrations",
|
"name": "@0x/migrations",
|
||||||
"version": "8.1.19",
|
"version": "8.1.18",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -68,20 +68,20 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^6.5.0",
|
"@0x/base-contract": "^6.5.0",
|
||||||
"@0x/contract-addresses": "^6.14.0",
|
"@0x/contract-addresses": "^6.13.0",
|
||||||
"@0x/contracts-asset-proxy": "^3.7.19",
|
"@0x/contracts-asset-proxy": "^3.7.19",
|
||||||
"@0x/contracts-coordinator": "^3.1.38",
|
"@0x/contracts-coordinator": "^3.1.38",
|
||||||
"@0x/contracts-dev-utils": "^1.3.36",
|
"@0x/contracts-dev-utils": "^1.3.36",
|
||||||
"@0x/contracts-erc1155": "^2.1.37",
|
"@0x/contracts-erc1155": "^2.1.37",
|
||||||
"@0x/contracts-erc20": "^3.3.30",
|
"@0x/contracts-erc20": "^3.3.29",
|
||||||
"@0x/contracts-erc721": "^3.1.37",
|
"@0x/contracts-erc721": "^3.1.37",
|
||||||
"@0x/contracts-exchange": "^3.2.38",
|
"@0x/contracts-exchange": "^3.2.38",
|
||||||
"@0x/contracts-exchange-forwarder": "^4.2.38",
|
"@0x/contracts-exchange-forwarder": "^4.2.38",
|
||||||
"@0x/contracts-extensions": "^6.2.32",
|
"@0x/contracts-extensions": "^6.2.32",
|
||||||
"@0x/contracts-multisig": "^4.1.38",
|
"@0x/contracts-multisig": "^4.1.38",
|
||||||
"@0x/contracts-staking": "^2.0.45",
|
"@0x/contracts-staking": "^2.0.45",
|
||||||
"@0x/contracts-utils": "^4.8.11",
|
"@0x/contracts-utils": "^4.8.10",
|
||||||
"@0x/contracts-zero-ex": "^0.33.0",
|
"@0x/contracts-zero-ex": "^0.32.0",
|
||||||
"@0x/sol-compiler": "^4.8.1",
|
"@0x/sol-compiler": "^4.8.1",
|
||||||
"@0x/subproviders": "^6.6.5",
|
"@0x/subproviders": "^6.6.5",
|
||||||
"@0x/typescript-typings": "^5.3.1",
|
"@0x/typescript-typings": "^5.3.1",
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"version": "11.13.0",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Added Support for GMX and Platypus on Avalanche",
|
|
||||||
"pr": 478
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1652919697
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"version": "11.12.0",
|
"version": "11.12.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
## v11.13.0 - _May 19, 2022_
|
|
||||||
|
|
||||||
* Added Support for GMX and Platypus on Avalanche (#478)
|
|
||||||
|
|
||||||
## v11.12.0 - _April 22, 2022_
|
## v11.12.0 - _April 22, 2022_
|
||||||
|
|
||||||
* Add `BalancerV2Batch` to `BridgeProtocol` enum (#462)
|
* Add `BalancerV2Batch` to `BridgeProtocol` enum (#462)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/protocol-utils",
|
"name": "@0x/protocol-utils",
|
||||||
"version": "11.13.0",
|
"version": "11.12.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -63,8 +63,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.34",
|
"@0x/assert": "^3.0.34",
|
||||||
"@0x/contract-addresses": "^6.14.0",
|
"@0x/contract-addresses": "^6.13.0",
|
||||||
"@0x/contract-wrappers": "^13.20.2",
|
"@0x/contract-wrappers": "^13.20.1",
|
||||||
"@0x/json-schemas": "^6.4.4",
|
"@0x/json-schemas": "^6.4.4",
|
||||||
"@0x/subproviders": "^6.6.5",
|
"@0x/subproviders": "^6.6.5",
|
||||||
"@0x/utils": "^6.5.3",
|
"@0x/utils": "^6.5.3",
|
||||||
|
|||||||
@@ -135,8 +135,6 @@ export enum BridgeProtocol {
|
|||||||
AaveV2,
|
AaveV2,
|
||||||
Compound,
|
Compound,
|
||||||
BalancerV2Batch,
|
BalancerV2Batch,
|
||||||
GMX,
|
|
||||||
Platypus,
|
|
||||||
}
|
}
|
||||||
// tslint:enable: enum-naming
|
// tslint:enable: enum-naming
|
||||||
|
|
||||||
|
|||||||
284
yarn.lock
284
yarn.lock
@@ -2683,6 +2683,14 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
defer-to-connect "^1.0.1"
|
defer-to-connect "^1.0.1"
|
||||||
|
|
||||||
|
"@typechain/ethers-v5@^10.0.0":
|
||||||
|
version "10.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.0.0.tgz#1b6e292d2ed9afb0d2f7a4674cc199bb95bad714"
|
||||||
|
integrity sha512-Kot7fwAqnH96ZbI8xrRgj5Kpv9yCEdjo7mxRqrH7bYpEgijT5MmuOo8IVsdhOu7Uog4ONg7k/d5UdbAtTKUgsA==
|
||||||
|
dependencies:
|
||||||
|
lodash "^4.17.15"
|
||||||
|
ts-essentials "^7.0.1"
|
||||||
|
|
||||||
"@types/bn.js@^4.11.0", "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4", "@types/bn.js@^4.11.5":
|
"@types/bn.js@^4.11.0", "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4", "@types/bn.js@^4.11.5":
|
||||||
version "4.11.6"
|
version "4.11.6"
|
||||||
resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c"
|
resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c"
|
||||||
@@ -2827,6 +2835,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/prettier@^2.1.1":
|
||||||
|
version "2.6.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.1.tgz#76e72d8a775eef7ce649c63c8acae1a0824bbaed"
|
||||||
|
integrity sha512-XFjFHmaLVifrAKaZ+EKghFHtHSUonyw8P2Qmy2/+osBnrKbH9UYtlK10zg8/kCt47MFilll/DEDKy3DHfJ0URw==
|
||||||
|
|
||||||
"@types/prompts@^2.0.9":
|
"@types/prompts@^2.0.9":
|
||||||
version "2.0.9"
|
version "2.0.9"
|
||||||
resolved "https://registry.yarnpkg.com/@types/prompts/-/prompts-2.0.9.tgz#19f419310eaa224a520476b19d4183f6a2b3bd8f"
|
resolved "https://registry.yarnpkg.com/@types/prompts/-/prompts-2.0.9.tgz#19f419310eaa224a520476b19d4183f6a2b3bd8f"
|
||||||
@@ -2934,7 +2947,7 @@ abstract-leveldown@3.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
xtend "~4.0.0"
|
xtend "~4.0.0"
|
||||||
|
|
||||||
abstract-leveldown@^2.4.1:
|
abstract-leveldown@^2.4.1, abstract-leveldown@~2.7.1:
|
||||||
version "2.7.2"
|
version "2.7.2"
|
||||||
resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93"
|
resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -2946,6 +2959,13 @@ abstract-leveldown@^5.0.0, abstract-leveldown@~5.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
xtend "~4.0.0"
|
xtend "~4.0.0"
|
||||||
|
|
||||||
|
abstract-leveldown@~2.6.0:
|
||||||
|
version "2.6.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8"
|
||||||
|
integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==
|
||||||
|
dependencies:
|
||||||
|
xtend "~4.0.0"
|
||||||
|
|
||||||
accepts@~1.3.7:
|
accepts@~1.3.7:
|
||||||
version "1.3.7"
|
version "1.3.7"
|
||||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
|
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
|
||||||
@@ -3128,6 +3148,16 @@ arr-union@^3.1.0:
|
|||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
|
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
|
||||||
|
|
||||||
|
array-back@^3.0.1, array-back@^3.1.0:
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0"
|
||||||
|
integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==
|
||||||
|
|
||||||
|
array-back@^4.0.1, array-back@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e"
|
||||||
|
integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==
|
||||||
|
|
||||||
array-differ@^2.0.3:
|
array-differ@^2.0.3:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1"
|
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1"
|
||||||
@@ -3230,7 +3260,7 @@ async-limiter@~1.0.0:
|
|||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
|
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
|
||||||
|
|
||||||
async@1.x:
|
async@1.x, async@^1.4.2:
|
||||||
version "1.5.2"
|
version "1.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
|
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
|
||||||
|
|
||||||
@@ -3815,11 +3845,21 @@ bigi@1.4.2, bigi@^1.1.0:
|
|||||||
version "1.4.2"
|
version "1.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.2.tgz#9c665a95f88b8b08fc05cfd731f561859d725825"
|
resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.2.tgz#9c665a95f88b8b08fc05cfd731f561859d725825"
|
||||||
|
|
||||||
bignumber.js@7.2.1, bignumber.js@^9.0.0, bignumber.js@^9.0.2, bignumber.js@~4.1.0, bignumber.js@~9.0.0, bignumber.js@~9.0.2:
|
bignumber.js@7.2.1:
|
||||||
|
version "7.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f"
|
||||||
|
integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==
|
||||||
|
|
||||||
|
bignumber.js@^9.0.0, bignumber.js@~9.0.0, bignumber.js@~9.0.2:
|
||||||
version "9.0.2"
|
version "9.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673"
|
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673"
|
||||||
integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==
|
integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==
|
||||||
|
|
||||||
|
bignumber.js@~4.1.0:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-4.1.0.tgz#db6f14067c140bd46624815a7916c92d9b6c24b1"
|
||||||
|
integrity sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==
|
||||||
|
|
||||||
binary-extensions@^2.0.0:
|
binary-extensions@^2.0.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9"
|
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9"
|
||||||
@@ -4326,6 +4366,14 @@ chalk@^4.0.0:
|
|||||||
ansi-styles "^4.1.0"
|
ansi-styles "^4.1.0"
|
||||||
supports-color "^7.1.0"
|
supports-color "^7.1.0"
|
||||||
|
|
||||||
|
chalk@^4.1.0:
|
||||||
|
version "4.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
|
||||||
|
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
||||||
|
dependencies:
|
||||||
|
ansi-styles "^4.1.0"
|
||||||
|
supports-color "^7.1.0"
|
||||||
|
|
||||||
change-case@^3.0.2:
|
change-case@^3.0.2:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.1.0.tgz#0e611b7edc9952df2e8513b27b42de72647dd17e"
|
resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.1.0.tgz#0e611b7edc9952df2e8513b27b42de72647dd17e"
|
||||||
@@ -4589,6 +4637,26 @@ command-exists@^1.2.8:
|
|||||||
version "1.2.9"
|
version "1.2.9"
|
||||||
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69"
|
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69"
|
||||||
|
|
||||||
|
command-line-args@^5.1.1:
|
||||||
|
version "5.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e"
|
||||||
|
integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==
|
||||||
|
dependencies:
|
||||||
|
array-back "^3.1.0"
|
||||||
|
find-replace "^3.0.0"
|
||||||
|
lodash.camelcase "^4.3.0"
|
||||||
|
typical "^4.0.0"
|
||||||
|
|
||||||
|
command-line-usage@^6.1.0:
|
||||||
|
version "6.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957"
|
||||||
|
integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==
|
||||||
|
dependencies:
|
||||||
|
array-back "^4.0.2"
|
||||||
|
chalk "^2.4.2"
|
||||||
|
table-layout "^1.0.2"
|
||||||
|
typical "^5.2.0"
|
||||||
|
|
||||||
commander@2.18.0:
|
commander@2.18.0:
|
||||||
version "2.18.0"
|
version "2.18.0"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970"
|
||||||
@@ -5019,6 +5087,13 @@ debug@^4.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ms "2.1.2"
|
ms "2.1.2"
|
||||||
|
|
||||||
|
debug@^4.3.1:
|
||||||
|
version "4.3.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||||
|
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||||
|
dependencies:
|
||||||
|
ms "2.1.2"
|
||||||
|
|
||||||
debuglog@^1.0.1:
|
debuglog@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
|
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
|
||||||
@@ -5127,7 +5202,7 @@ deep-equal@~1.1.1:
|
|||||||
object-keys "^1.1.1"
|
object-keys "^1.1.1"
|
||||||
regexp.prototype.flags "^1.2.0"
|
regexp.prototype.flags "^1.2.0"
|
||||||
|
|
||||||
deep-extend@^0.6.0:
|
deep-extend@^0.6.0, deep-extend@~0.6.0:
|
||||||
version "0.6.0"
|
version "0.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
|
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
|
||||||
|
|
||||||
@@ -5151,6 +5226,13 @@ defer-to-connect@^1.0.1:
|
|||||||
version "1.1.3"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591"
|
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591"
|
||||||
|
|
||||||
|
deferred-leveldown@~1.2.1:
|
||||||
|
version "1.2.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb"
|
||||||
|
integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==
|
||||||
|
dependencies:
|
||||||
|
abstract-leveldown "~2.6.0"
|
||||||
|
|
||||||
deferred-leveldown@~4.0.0:
|
deferred-leveldown@~4.0.0:
|
||||||
version "4.0.2"
|
version "4.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz#0b0570087827bf480a23494b398f04c128c19a20"
|
resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz#0b0570087827bf480a23494b398f04c128c19a20"
|
||||||
@@ -6484,6 +6566,13 @@ find-cache-dir@^0.1.1:
|
|||||||
mkdirp "^0.5.1"
|
mkdirp "^0.5.1"
|
||||||
pkg-dir "^1.0.0"
|
pkg-dir "^1.0.0"
|
||||||
|
|
||||||
|
find-replace@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38"
|
||||||
|
integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==
|
||||||
|
dependencies:
|
||||||
|
array-back "^3.0.1"
|
||||||
|
|
||||||
find-up@3.0.0, find-up@^3.0.0:
|
find-up@3.0.0, find-up@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
|
resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
|
||||||
@@ -6638,7 +6727,7 @@ fs-extra@^4.0.2, fs-extra@^4.0.3:
|
|||||||
jsonfile "^4.0.0"
|
jsonfile "^4.0.0"
|
||||||
universalify "^0.1.0"
|
universalify "^0.1.0"
|
||||||
|
|
||||||
fs-extra@^7.0.1:
|
fs-extra@^7.0.0, fs-extra@^7.0.1:
|
||||||
version "7.0.1"
|
version "7.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
|
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -6978,6 +7067,18 @@ glob@7.1.6, glob@^7.0.0, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glo
|
|||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
glob@7.1.7:
|
||||||
|
version "7.1.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
|
||||||
|
integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
|
||||||
|
dependencies:
|
||||||
|
fs.realpath "^1.0.0"
|
||||||
|
inflight "^1.0.4"
|
||||||
|
inherits "2"
|
||||||
|
minimatch "^3.0.4"
|
||||||
|
once "^1.3.0"
|
||||||
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
glob@^5.0.15:
|
glob@^5.0.15:
|
||||||
version "5.0.15"
|
version "5.0.15"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
|
||||||
@@ -7379,6 +7480,11 @@ ignore@^4.0.3, ignore@^4.0.6:
|
|||||||
version "4.0.6"
|
version "4.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
|
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
|
||||||
|
|
||||||
|
immediate@^3.2.3:
|
||||||
|
version "3.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266"
|
||||||
|
integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==
|
||||||
|
|
||||||
immediate@~3.2.3:
|
immediate@~3.2.3:
|
||||||
version "3.2.3"
|
version "3.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c"
|
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c"
|
||||||
@@ -8239,12 +8345,31 @@ level-codec@^9.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
buffer "^5.6.0"
|
buffer "^5.6.0"
|
||||||
|
|
||||||
|
level-codec@~7.0.0:
|
||||||
|
version "7.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7"
|
||||||
|
integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==
|
||||||
|
|
||||||
|
level-errors@^1.0.3:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d"
|
||||||
|
integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w==
|
||||||
|
dependencies:
|
||||||
|
errno "~0.1.1"
|
||||||
|
|
||||||
level-errors@^2.0.0, level-errors@~2.0.0:
|
level-errors@^2.0.0, level-errors@~2.0.0:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8"
|
resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8"
|
||||||
dependencies:
|
dependencies:
|
||||||
errno "~0.1.1"
|
errno "~0.1.1"
|
||||||
|
|
||||||
|
level-errors@~1.0.3:
|
||||||
|
version "1.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859"
|
||||||
|
integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==
|
||||||
|
dependencies:
|
||||||
|
errno "~0.1.1"
|
||||||
|
|
||||||
level-iterator-stream@^2.0.3:
|
level-iterator-stream@^2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz#ccfff7c046dcf47955ae9a86f46dfa06a31688b4"
|
resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz#ccfff7c046dcf47955ae9a86f46dfa06a31688b4"
|
||||||
@@ -8253,6 +8378,16 @@ level-iterator-stream@^2.0.3:
|
|||||||
readable-stream "^2.0.5"
|
readable-stream "^2.0.5"
|
||||||
xtend "^4.0.0"
|
xtend "^4.0.0"
|
||||||
|
|
||||||
|
level-iterator-stream@~1.3.0:
|
||||||
|
version "1.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed"
|
||||||
|
integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=
|
||||||
|
dependencies:
|
||||||
|
inherits "^2.0.1"
|
||||||
|
level-errors "^1.0.3"
|
||||||
|
readable-stream "^1.0.33"
|
||||||
|
xtend "^4.0.0"
|
||||||
|
|
||||||
level-iterator-stream@~3.0.0:
|
level-iterator-stream@~3.0.0:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz#2c98a4f8820d87cdacab3132506815419077c730"
|
resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz#2c98a4f8820d87cdacab3132506815419077c730"
|
||||||
@@ -8296,6 +8431,14 @@ level-sublevel@6.6.4:
|
|||||||
typewiselite "~1.0.0"
|
typewiselite "~1.0.0"
|
||||||
xtend "~4.0.0"
|
xtend "~4.0.0"
|
||||||
|
|
||||||
|
level-ws@0.0.0:
|
||||||
|
version "0.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b"
|
||||||
|
integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=
|
||||||
|
dependencies:
|
||||||
|
readable-stream "~1.0.15"
|
||||||
|
xtend "~2.1.1"
|
||||||
|
|
||||||
level-ws@^1.0.0:
|
level-ws@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-1.0.0.tgz#19a22d2d4ac57b18cc7c6ecc4bd23d899d8f603b"
|
resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-1.0.0.tgz#19a22d2d4ac57b18cc7c6ecc4bd23d899d8f603b"
|
||||||
@@ -8313,6 +8456,19 @@ levelup@3.1.1, levelup@^3.0.0:
|
|||||||
level-iterator-stream "~3.0.0"
|
level-iterator-stream "~3.0.0"
|
||||||
xtend "~4.0.0"
|
xtend "~4.0.0"
|
||||||
|
|
||||||
|
levelup@^1.2.1:
|
||||||
|
version "1.3.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab"
|
||||||
|
integrity sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==
|
||||||
|
dependencies:
|
||||||
|
deferred-leveldown "~1.2.1"
|
||||||
|
level-codec "~7.0.0"
|
||||||
|
level-errors "~1.0.3"
|
||||||
|
level-iterator-stream "~1.3.0"
|
||||||
|
prr "~1.0.1"
|
||||||
|
semver "~5.4.1"
|
||||||
|
xtend "~4.0.0"
|
||||||
|
|
||||||
levn@^0.3.0, levn@~0.3.0:
|
levn@^0.3.0, levn@~0.3.0:
|
||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
|
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
|
||||||
@@ -8392,6 +8548,11 @@ lodash._reinterpolate@^3.0.0:
|
|||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
|
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
|
||||||
|
|
||||||
|
lodash.camelcase@^4.3.0:
|
||||||
|
version "4.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
|
||||||
|
integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY=
|
||||||
|
|
||||||
lodash.clonedeep@^4.5.0:
|
lodash.clonedeep@^4.5.0:
|
||||||
version "4.5.0"
|
version "4.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
|
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
|
||||||
@@ -8679,6 +8840,18 @@ mem@^4.0.0:
|
|||||||
mimic-fn "^2.0.0"
|
mimic-fn "^2.0.0"
|
||||||
p-is-promise "^2.0.0"
|
p-is-promise "^2.0.0"
|
||||||
|
|
||||||
|
memdown@^1.0.0:
|
||||||
|
version "1.4.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215"
|
||||||
|
integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=
|
||||||
|
dependencies:
|
||||||
|
abstract-leveldown "~2.7.1"
|
||||||
|
functional-red-black-tree "^1.0.1"
|
||||||
|
immediate "^3.2.3"
|
||||||
|
inherits "~2.0.1"
|
||||||
|
ltgt "~2.2.0"
|
||||||
|
safe-buffer "~5.1.1"
|
||||||
|
|
||||||
memdown@~3.0.0:
|
memdown@~3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/memdown/-/memdown-3.0.0.tgz#93aca055d743b20efc37492e9e399784f2958309"
|
resolved "https://registry.yarnpkg.com/memdown/-/memdown-3.0.0.tgz#93aca055d743b20efc37492e9e399784f2958309"
|
||||||
@@ -8753,7 +8926,7 @@ merge2@^1.2.3:
|
|||||||
version "1.4.1"
|
version "1.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
|
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
|
||||||
|
|
||||||
merkle-patricia-tree@3.0.0, merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2:
|
merkle-patricia-tree@3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz#448d85415565df72febc33ca362b8b614f5a58f8"
|
resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz#448d85415565df72febc33ca362b8b614f5a58f8"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -8765,6 +8938,20 @@ merkle-patricia-tree@3.0.0, merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2
|
|||||||
rlp "^2.0.0"
|
rlp "^2.0.0"
|
||||||
semaphore ">=1.0.1"
|
semaphore ">=1.0.1"
|
||||||
|
|
||||||
|
merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2:
|
||||||
|
version "2.3.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a"
|
||||||
|
integrity sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==
|
||||||
|
dependencies:
|
||||||
|
async "^1.4.2"
|
||||||
|
ethereumjs-util "^5.0.0"
|
||||||
|
level-ws "0.0.0"
|
||||||
|
levelup "^1.2.1"
|
||||||
|
memdown "^1.0.0"
|
||||||
|
readable-stream "^2.0.0"
|
||||||
|
rlp "^2.0.0"
|
||||||
|
semaphore ">=1.0.1"
|
||||||
|
|
||||||
methods@~1.1.2:
|
methods@~1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
|
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
|
||||||
@@ -8943,7 +9130,7 @@ mkdirp-promise@^5.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
mkdirp "*"
|
mkdirp "*"
|
||||||
|
|
||||||
mkdirp@*, mkdirp@^1.0.3:
|
mkdirp@*, mkdirp@^1.0.3, mkdirp@^1.0.4:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||||
|
|
||||||
@@ -10101,6 +10288,11 @@ prettier@^2.0.5:
|
|||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
|
||||||
|
|
||||||
|
prettier@^2.3.1:
|
||||||
|
version "2.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032"
|
||||||
|
integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==
|
||||||
|
|
||||||
pretty-bytes@^1.0.4:
|
pretty-bytes@^1.0.4:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84"
|
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84"
|
||||||
@@ -10533,7 +10725,7 @@ read@1, read@1.0.x, read@~1.0.1, read@~1.0.5:
|
|||||||
string_decoder "^1.1.1"
|
string_decoder "^1.1.1"
|
||||||
util-deprecate "^1.0.1"
|
util-deprecate "^1.0.1"
|
||||||
|
|
||||||
"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.26:
|
"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.15, readable-stream@~1.0.26:
|
||||||
version "1.0.34"
|
version "1.0.34"
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -10542,7 +10734,7 @@ read@1, read@1.0.x, read@~1.0.1, read@~1.0.5:
|
|||||||
isarray "0.0.1"
|
isarray "0.0.1"
|
||||||
string_decoder "~0.10.x"
|
string_decoder "~0.10.x"
|
||||||
|
|
||||||
readable-stream@~1.1.9:
|
readable-stream@^1.0.33, readable-stream@~1.1.9:
|
||||||
version "1.1.14"
|
version "1.1.14"
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -10599,6 +10791,11 @@ redent@^3.0.0:
|
|||||||
indent-string "^4.0.0"
|
indent-string "^4.0.0"
|
||||||
strip-indent "^3.0.0"
|
strip-indent "^3.0.0"
|
||||||
|
|
||||||
|
reduce-flatten@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27"
|
||||||
|
integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==
|
||||||
|
|
||||||
regenerate@^1.2.1:
|
regenerate@^1.2.1:
|
||||||
version "1.4.1"
|
version "1.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f"
|
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f"
|
||||||
@@ -11006,6 +11203,11 @@ semver@^7.3.4:
|
|||||||
dependencies:
|
dependencies:
|
||||||
lru-cache "^6.0.0"
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
|
semver@~5.4.1:
|
||||||
|
version "5.4.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
||||||
|
integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==
|
||||||
|
|
||||||
send@0.17.1:
|
send@0.17.1:
|
||||||
version "0.17.1"
|
version "0.17.1"
|
||||||
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
|
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
|
||||||
@@ -11474,6 +11676,11 @@ string-editor@^0.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
editor "^1.0.0"
|
editor "^1.0.0"
|
||||||
|
|
||||||
|
string-format@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b"
|
||||||
|
integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==
|
||||||
|
|
||||||
string-width@^1.0.1:
|
string-width@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
|
||||||
@@ -11709,6 +11916,16 @@ swarm-js@^0.1.40:
|
|||||||
tar "^4.0.2"
|
tar "^4.0.2"
|
||||||
xhr-request "^1.0.1"
|
xhr-request "^1.0.1"
|
||||||
|
|
||||||
|
table-layout@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04"
|
||||||
|
integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==
|
||||||
|
dependencies:
|
||||||
|
array-back "^4.0.1"
|
||||||
|
deep-extend "~0.6.0"
|
||||||
|
typical "^5.2.0"
|
||||||
|
wordwrapjs "^4.0.0"
|
||||||
|
|
||||||
table@^5.2.3:
|
table@^5.2.3:
|
||||||
version "5.4.6"
|
version "5.4.6"
|
||||||
resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
|
resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
|
||||||
@@ -12034,6 +12251,21 @@ truffle@^5.0.32:
|
|||||||
mocha "8.1.2"
|
mocha "8.1.2"
|
||||||
original-require "1.0.1"
|
original-require "1.0.1"
|
||||||
|
|
||||||
|
ts-command-line-args@^2.2.0:
|
||||||
|
version "2.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.3.1.tgz#b6188e42efc6cf7a8898e438a873fbb15505ddd6"
|
||||||
|
integrity sha512-FR3y7pLl/fuUNSmnPhfLArGqRrpojQgIEEOVzYx9DhTmfIN7C9RWSfpkJEF4J+Gk7aVx5pak8I7vWZsaN4N84g==
|
||||||
|
dependencies:
|
||||||
|
chalk "^4.1.0"
|
||||||
|
command-line-args "^5.1.1"
|
||||||
|
command-line-usage "^6.1.0"
|
||||||
|
string-format "^2.0.0"
|
||||||
|
|
||||||
|
ts-essentials@^7.0.1:
|
||||||
|
version "7.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38"
|
||||||
|
integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==
|
||||||
|
|
||||||
tslib@1.9.0:
|
tslib@1.9.0:
|
||||||
version "1.9.0"
|
version "1.9.0"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
|
||||||
@@ -12150,6 +12382,22 @@ type@^2.0.0:
|
|||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/type/-/type-2.1.0.tgz#9bdc22c648cf8cf86dd23d32336a41cfb6475e3f"
|
resolved "https://registry.yarnpkg.com/type/-/type-2.1.0.tgz#9bdc22c648cf8cf86dd23d32336a41cfb6475e3f"
|
||||||
|
|
||||||
|
typechain@^8.0.0:
|
||||||
|
version "8.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.0.0.tgz#a5dbe754717a7e16247df52b5285903de600e8ff"
|
||||||
|
integrity sha512-rqDfDYc9voVAhmfVfAwzg3VYFvhvs5ck1X9T/iWkX745Cul4t+V/smjnyqrbDzWDbzD93xfld1epg7Y/uFAesQ==
|
||||||
|
dependencies:
|
||||||
|
"@types/prettier" "^2.1.1"
|
||||||
|
debug "^4.3.1"
|
||||||
|
fs-extra "^7.0.0"
|
||||||
|
glob "7.1.7"
|
||||||
|
js-sha3 "^0.8.0"
|
||||||
|
lodash "^4.17.15"
|
||||||
|
mkdirp "^1.0.4"
|
||||||
|
prettier "^2.3.1"
|
||||||
|
ts-command-line-args "^2.2.0"
|
||||||
|
ts-essentials "^7.0.1"
|
||||||
|
|
||||||
typedarray-to-buffer@^3.1.5:
|
typedarray-to-buffer@^3.1.5:
|
||||||
version "3.1.5"
|
version "3.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
|
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
|
||||||
@@ -12227,6 +12475,16 @@ typewiselite@~1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/typewiselite/-/typewiselite-1.0.0.tgz#c8882fa1bb1092c06005a97f34ef5c8508e3664e"
|
resolved "https://registry.yarnpkg.com/typewiselite/-/typewiselite-1.0.0.tgz#c8882fa1bb1092c06005a97f34ef5c8508e3664e"
|
||||||
|
|
||||||
|
typical@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4"
|
||||||
|
integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==
|
||||||
|
|
||||||
|
typical@^5.2.0:
|
||||||
|
version "5.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066"
|
||||||
|
integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==
|
||||||
|
|
||||||
u2f-api@0.2.7:
|
u2f-api@0.2.7:
|
||||||
version "0.2.7"
|
version "0.2.7"
|
||||||
resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-0.2.7.tgz#17bf196b242f6bf72353d9858e6a7566cc192720"
|
resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-0.2.7.tgz#17bf196b242f6bf72353d9858e6a7566cc192720"
|
||||||
@@ -13237,6 +13495,14 @@ wordwrap@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
||||||
|
|
||||||
|
wordwrapjs@^4.0.0:
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f"
|
||||||
|
integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==
|
||||||
|
dependencies:
|
||||||
|
reduce-flatten "^2.0.0"
|
||||||
|
typical "^5.2.0"
|
||||||
|
|
||||||
workerpool@6.0.0:
|
workerpool@6.0.0:
|
||||||
version "6.0.0"
|
version "6.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.0.tgz#85aad67fa1a2c8ef9386a1b43539900f61d03d58"
|
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.0.tgz#85aad67fa1a2c8ef9386a1b43539900f61d03d58"
|
||||||
|
|||||||
Reference in New Issue
Block a user