Skip to content

Commit

Permalink
docs(protocol): deploy more token unlock contract (#17763)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Jul 11, 2024
1 parent e524782 commit 30631a9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/protocol/script/tokenunlock/Vest.data.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[
{
"recipient": "0xa48dEBc18D5e63F1FB94DD513f643e412684f8a4",
"proxy": "0x33A270541f383A4A48dB6C5f1f00A161b8F79e2a",
"recipient": "0xa48dEBc18D5e63F1FB94DD513f643e412684f8a4",
"vestAmount": 35000
},
{
"recipient": "0xa48dEBc18D5e63F1FB94DD513f643e412684f8a4",
"proxy": "0x33A270541f383A4A48dB6C5f1f00A161b8F79e2a",
"recipient": "0xa48dEBc18D5e63F1FB94DD513f643e412684f8a4",
"vestAmount": 25000
},
{
"recipient": "0xa48dEBc18D5e63F1FB94DD513f643e412684f8a4",
"proxy": "0x33A270541f383A4A48dB6C5f1f00A161b8F79e2a",
"recipient": "0xa48dEBc18D5e63F1FB94DD513f643e412684f8a4",
"vestAmount": 15000
}
]
9 changes: 2 additions & 7 deletions packages/protocol/script/tokenunlock/Vest.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,9 @@ contract VestTokenUnlock is Script {

vm.startBroadcast();
for (uint256 i; i < items.length; i++) {
// This is needed due to some memory read operation! It seems forge/foundry
// parseJson works in a way that we need to read into local variables from struct,
// as it acts like a stack-like buffer read.
address proxy = items[i].recipient;
uint128 vestAmount = uint128(items[i].vestAmount * 1e18);

tko.approve(proxy, vestAmount);
TokenUnlock(proxy).vest(vestAmount);
tko.approve(items[i].proxy, vestAmount);
TokenUnlock(items[i].proxy).vest(vestAmount);
}
vm.stopBroadcast();
}
Expand Down
5 changes: 5 additions & 0 deletions packages/protocol/script/tokenunlock/exercise1.data.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,5 +623,10 @@
"proxy": "0x4CE8E8bB4ea26cabe32C5B9100Ee9eD6759C58CB",
"recipient": "0xFc207A04ff27D0865c9879f4F84B82c5a0753989",
"vestAmount": 234522
},
{
"proxy": "0x2Bc21D70BDe29a8E6576F7aCD979029058f2eeF9",
"recipient": "0x841F98C82Df7Eb6107a7b6A0e9Ab054a01819428",
"vestAmount": 2439024
}
]

0 comments on commit 30631a9

Please sign in to comment.