Comments (3)
The link to the documentation is wrong, but I assume that it intended to point here. In there, it specifies that otherAddress
is unused, and same for primaryMarketId
.
However, here the Withdraw
action takes a to
parameter. I assume that the first linked documentation is wrong, and the otherAddress
parameter in Action
is actually used as to
in Withdraw
. Otherwise that feature would be not implemented, which would be weird.
Furthermore, our tests use a separate contract to receive the flash loans, which the MockBorrower pulls funds from. Given that we are giving the loanReceiver
address to Dolomite in the otherAddress
variable, and the funds are actually appearing in the loanReceiver
(shown below) it follows that the implementation is right, and the documentation wrong.
On primaryMarketId
being also described as "unused" in the same documentation, Dolomite uses a single contract as entry point for all operations and the only way that we can tell Dolomite which token we are taking a flash loan of is with primaryMarketId
as seen here. As a test, if we don't pass a primaryMarketId
to Withdraw
the token transferred from Dolomite to LoanReceiver is not the asset
that we wanted to borrow (probably it defaults to something).
From Dolomite to LoanReceiver:
from erc7399-wrappers.
Sorry, but where does it say primaryMarketId
is unused?
First comment says it's needed for Deposit
& Withdraw
from erc7399-wrappers.
Great, I'm glad this wasn't an issue after all.
I think it says not needed for otherAddress and data. Agree with ultrasecreth it says it's needed for primaryMArketId.
Anyways, closing, sorry for the fire drill!
from erc7399-wrappers.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erc7399-wrappers.