-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated Gas Payments #312
Conversation
…xecution ( bridge + destination chain )
… overall gas cost on all routers. Mark the contract address used as an entry point for the transaction.
…if there is provided value for gas payment.
…value to router.estimate
56c7469
to
ae78307
Compare
This reverts commit 1db26b8.
…e gas price. The message/proof costs are in weights.
/// @inheritdoc ICentrifugeRouter | ||
function requestRedeem(address vault, uint256 amount, address controller, address owner) external protected { | ||
function requestRedeem(address vault, uint256 amount, address controller, address owner) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why aren't we topping up the gateway here. The user has to pay for gas here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know. I haven't put all the methods. Thought for the MVP we wanted to have a single method
else revert("Gateway/file-unrecognized-param"); | ||
emit File(what, data1, data2); | ||
} | ||
|
||
// --- Incoming --- | ||
/// @inheritdoc IGateway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handle has to be auth
🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we agreed that it's fine right now. Only routers can call handle. Correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree this is correct as is.
function topUp() external payable { | ||
require(RootLike(root).endorsed(msg.sender), "Gateway/only-endorsed-can-topup"); | ||
require(msg.value > 0, "Gateway/cannot-topup-with-nothing"); | ||
quota = msg.value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need the extra quota
variable, would just use fuel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some renaming. quota
is updated only by CentrifugeRouter
. If there is no quote
assigned of the transaction, then we use the gateway's balance .
else revert("Gateway/file-unrecognized-param"); | ||
emit File(what, data1, data2); | ||
} | ||
|
||
// --- Incoming --- | ||
/// @inheritdoc IGateway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree this is correct as is.
@@ -58,8 +57,13 @@ contract Deployer is Script { | |||
investmentManager = new InvestmentManager(address(root), address(escrow)); | |||
poolManager = new PoolManager(address(escrow), vaultFactory, restrictionManagerFactory, trancheTokenFactory); | |||
|
|||
// TODO THESE VALUES NEEDS TO BE CHECKED | |||
gasService = new GasService(20000000000000000, 20000000000000000, 2500000000000000000, 178947400000000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move these to env vars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that once we come up wuth the actual values, we can put the into env vars :D
… that have custom manager
* chore: Migrate all Aggregator tests to be applicable for gateway * Format --------- Co-authored-by: Jeroen Offerijns <[email protected]>
* Sepolia deployment * Format * Undo router values * cleanup
#331) * chore: Move responsibility fo handling an exception from the caller to the callee ( method itself ) * chore: Fix formatting
…#334) * fix: A way to call topUp with different owner than the CR and a dummy vault causing an issue in the flow execution. * fix: The check for vault should happen even when the owner is the CR address
…nsaction not triggered by CentrifugeRouter (#335) * fea:(Gateway) Allow partial payments from the gateway balance for transaction not triggered by CentrifugeRouter * chore: A forgotten file to be renamed
Coverage after merging gg/feat/automate-gas-payments into main will be
Coverage Report |
No description provided.