-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* FeesEscrow integration * FeesEscrow for Gnosis & Harbour * Fix fees transferred event * Add placeholders for fees escrows Co-authored-by: Dmitry Pavlov <dmitry.p@stakewise.io> Co-authored-by: Dmitri Tsumak <tsumak.dmitri@gmail.com>
- Loading branch information
1 parent
60f713c
commit 5e431de
Showing
8 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
[ | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_pool", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_rewardToken", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "_symmetricPoolId", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "contract IBalancerVault", | ||
"name": "_symmetricVault", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "contract IWrapper", | ||
"name": "_wrapper", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_mGnoWrapper", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_gnoToken", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "contract IERC20", | ||
"name": "_mGnoToken", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "FeesTransferred", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "transferToPool", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"stateMutability": "payable", | ||
"type": "receive" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { createOrLoadPool } from "../entities"; | ||
import { FeesTransferred } from "../../generated/FeesEscrow/FeesEscrow"; | ||
import { log } from "@graphprotocol/graph-ts"; | ||
|
||
export function handleFeesTransferred(event: FeesTransferred): void { | ||
let pool = createOrLoadPool(); | ||
pool.balance = pool.balance.plus(event.params.amount); | ||
pool.save(); | ||
log.info("[FeesEscrow] FeesTransferred amount={}", [event.params.amount.toString()]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters