Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaShWoof committed Nov 12, 2024
1 parent 99b05ed commit 4d8684f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions deployments/mainnet/usdt/relations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ export default {
artifact: 'contracts/ERC20.sol:ERC20',
},
'TransparentUpgradeableProxy': {
artifact: 'contracts/ERC20.sol:ERC20',
delegates: {
field: {
slot: '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc'
}
},
},
'ERC1967Proxy': {
artifact: 'contracts/ERC20.sol:ERC20',
delegates: {
field: {
Expand Down
9 changes: 8 additions & 1 deletion deployments/relations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ const relationConfigMap: RelationConfigMap = {
})
);
},
alias: async (token) => token.symbol(),
alias: async (token) =>{
try {
return token.symbol();
}
catch (e) {
throw new Error(`failed to get symbol for token ${token.address} with error: ${e}`);
}
},
},
assetPriceFeeds: {
field: async (comet) => {
Expand Down
2 changes: 1 addition & 1 deletion scenario/SupplyScenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ scenario(
const utilization = await comet.getUtilization();
const borrowRate = (await comet.getBorrowRate(utilization)).toBigInt();

expectApproximately(await albert.getCometBaseBalance(), -999n * scale, getInterest(999n * scale, borrowRate, 1n) + 2n);
expectApproximately(await albert.getCometBaseBalance(), -999n * scale, getInterest(999n * scale, borrowRate, 4n) + 2n);

// Albert repays 1000 units of base borrow
await baseAsset.approve(albert, comet.address);
Expand Down

0 comments on commit 4d8684f

Please sign in to comment.