Skip to content

Commit

Permalink
chore: Fix Spike UI redeem bug. Update sdk test signers to add upgrad…
Browse files Browse the repository at this point in the history
…er and remove reward
  • Loading branch information
lucasia committed Oct 29, 2024
1 parent 6abe9ed commit 90175db
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ contract DeployAndLoadLiquidMultiTokenVault is DeployLiquidMultiTokenVault {
//(0) 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000 ETH) - owner
//(1) 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 (10000 ETH) - operator
//(2) 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC (10000 ETH) - custody (vault->custody->vault)
//(3) 0x90F79bf6EB2c4f870365E785982E1f101E93b906 (10000 ETH) - treasury
//(3) 0x90F79bf6EB2c4f870365E785982E1f101E93b906 (10000 ETH) - upgrader
//(4) 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 (10000 ETH) - deployer
//(5) 0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc (10000 ETH) - rewards
//(5) 0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc (10000 ETH) - treasury
//(6) 0x976EA74026E726554dB657fA54763abd0C3a0aa9 (10000 ETH) - asset manager
//(7) 0x14dC79964da2C08b23698B3D3cc7Ca32193d9955 (10000 ETH) - alice
//(8) 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f (10000 ETH) - bob
Expand Down
16 changes: 8 additions & 8 deletions packages/sdk/test/src/utils/test-signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export class TestSigners {
private _admin: TestSigner;
private _operator: TestSigner;
private _custodian: TestSigner;
private _treasury: TestSigner;
private _upgrader: TestSigner;
private _deployer: TestSigner;
private _rewardVault: TestSigner;
private _treasury: TestSigner;
private _assetManager: TestSigner;
private _alice: TestSigner;
private _bob: TestSigner;
Expand All @@ -47,9 +47,9 @@ export class TestSigners {
this._admin = new TestSigner(0, provider);
this._operator = new TestSigner(1, provider);
this._custodian = new TestSigner(2, provider);
this._treasury = new TestSigner(3, provider);
this._upgrader = new TestSigner(3, provider);
this._deployer = new TestSigner(4, provider);
this._rewardVault = new TestSigner(5, provider);
this._treasury = new TestSigner(5, provider);
this._assetManager = new TestSigner(6, provider);
this._alice = new TestSigner(7, provider);
this._bob = new TestSigner(8, provider);
Expand All @@ -68,16 +68,16 @@ export class TestSigners {
return this._custodian;
}

get treasury(): TestSigner {
return this._treasury;
get upgrader(): TestSigner {
return this._upgrader;
}

get deployer(): TestSigner {
return this._deployer;
}

get rewardVault(): TestSigner {
return this._rewardVault;
get treasury(): TestSigner {
return this._treasury;
}

get assetManager(): TestSigner {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ const ViewSection = () => {
return;
}

if (assetAmount < assetsToRedeem) {
notification.error("Sorry! No enough balance in the vault.");
if (parseFloat(assetAmount) < parseFloat(assetsToRedeem)) {
const errorMsg = "Sorry! Not enough balance in the vault. " + assetAmount + " < " + assetsToRedeem;
notification.error(errorMsg);
return;
}

Expand Down
124 changes: 113 additions & 11 deletions spikes/spike-liquid-stone/packages/nextjs/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,24 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "cancelRequestUnlock",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "requestId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "claimableDepositRequest",
Expand Down Expand Up @@ -1980,7 +1998,7 @@
"internalType": "address"
},
{
"name": "",
"name": "controller",
"type": "address",
"internalType": "address"
}
Expand Down Expand Up @@ -2124,7 +2142,7 @@
"internalType": "uint256"
},
{
"name": "",
"name": "controller",
"type": "address",
"internalType": "address"
},
Expand Down Expand Up @@ -2693,6 +2711,31 @@
],
"anonymous": false
},
{
"type": "event",
"name": "CancelRedeemRequest",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "requestId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "CurrentPeriodRateChanged",
Expand Down Expand Up @@ -3383,7 +3426,7 @@
},
{
"type": "error",
"name": "LiquidContinuousMultiTokenVault__ControllerMismatch",
"name": "LiquidContinuousMultiTokenVault__ControllerNotSender",
"inputs": [
{
"name": "sender",
Expand Down Expand Up @@ -3440,6 +3483,22 @@
}
]
},
{
"type": "error",
"name": "LiquidContinuousMultiTokenVault__UnAuthorized",
"inputs": [
{
"name": "sender",
"type": "address",
"internalType": "address"
},
{
"name": "authorizedOwner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "LiquidContinuousMultiTokenVault__UnlockPeriodMismatch",
Expand Down Expand Up @@ -3705,7 +3764,7 @@
},
{
"type": "error",
"name": "TimelockAsyncUnlock__UnlockBeforeDepositPeriod",
"name": "TimelockAsyncUnlock__UnlockBeforeCurrentPeriod",
"inputs": [
{
"name": "caller",
Expand All @@ -3718,7 +3777,7 @@
"internalType": "address"
},
{
"name": "depositPeriod",
"name": "currentPeriod",
"type": "uint256",
"internalType": "uint256"
},
Expand All @@ -3731,7 +3790,7 @@
},
{
"type": "error",
"name": "TimelockAsyncUnlock__UnlockBeforeUnlockPeriod",
"name": "TimelockAsyncUnlock__UnlockBeforeDepositPeriod",
"inputs": [
{
"name": "caller",
Expand All @@ -3744,7 +3803,7 @@
"internalType": "address"
},
{
"name": "currentPeriod",
"name": "depositPeriod",
"type": "uint256",
"internalType": "uint256"
},
Expand Down Expand Up @@ -4472,6 +4531,24 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "cancelRequestUnlock",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "requestId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "currentPeriod",
Expand Down Expand Up @@ -4822,6 +4899,31 @@
"outputs": [],
"stateMutability": "payable"
},
{
"type": "event",
"name": "CancelRedeemRequest",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "requestId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Initialized",
Expand Down Expand Up @@ -4987,7 +5089,7 @@
},
{
"type": "error",
"name": "TimelockAsyncUnlock__UnlockBeforeDepositPeriod",
"name": "TimelockAsyncUnlock__UnlockBeforeCurrentPeriod",
"inputs": [
{
"name": "caller",
Expand All @@ -5000,7 +5102,7 @@
"internalType": "address"
},
{
"name": "depositPeriod",
"name": "currentPeriod",
"type": "uint256",
"internalType": "uint256"
},
Expand All @@ -5013,7 +5115,7 @@
},
{
"type": "error",
"name": "TimelockAsyncUnlock__UnlockBeforeUnlockPeriod",
"name": "TimelockAsyncUnlock__UnlockBeforeDepositPeriod",
"inputs": [
{
"name": "caller",
Expand All @@ -5026,7 +5128,7 @@
"internalType": "address"
},
{
"name": "currentPeriod",
"name": "depositPeriod",
"type": "uint256",
"internalType": "uint256"
},
Expand Down

0 comments on commit 90175db

Please sign in to comment.