Skip to content

Commit

Permalink
build: update contracts and regen signatures (#414)
Browse files Browse the repository at this point in the history
* fix: repos on compile contracts sh

* deps: update brlc token to 0858ec4

* chore: restore repo state after test

* deps: update pix cashier to a528d0c

* deps: update yield streamer to 7683517

* build: regen signatures
  • Loading branch information
mayconamaroCW authored Mar 20, 2024
1 parent 80779e3 commit 9220214
Show file tree
Hide file tree
Showing 8 changed files with 252 additions and 95 deletions.
6 changes: 3 additions & 3 deletions e2e-contracts/clone-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ clone() {
log "Cloning or updating repositories"
clone brlc-multisig 918a226
clone brlc-periphery b8d507a
clone brlc-token 86d5d4f
clone brlc-token 0858ec4
clone compound-periphery e4d68df
clone brlc-yield-streamer e63d8ba
clone brlc-pix-cashier 00cc007
clone brlc-yield-streamer 7683517
clone brlc-pix-cashier a528d0c
11 changes: 7 additions & 4 deletions e2e-contracts/compile-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ asdf local solidity 0.8.16
# execute
compile_contract brlc-token BRLCToken

compile_contract brlc-periphery CardPaymentProcessor
compile_contract brlc-pix-cashier PixCashier

compile_contract brlc-periphery CashbackDistributor
compile_contract brlc-periphery PixCashier
compile_contract brlc-periphery TokenDistributor
compile_contract brlc-periphery CardPaymentProcessor

compile_contract compound-periphery CompoundAgent

compile_contract brlc-multisig MultiSigWallet

compile_contract compound-periphery CompoundAgent
compile_contract brlc-yield-streamer BalanceTracker
compile_contract brlc-yield-streamer YieldStreamer
174 changes: 87 additions & 87 deletions e2e-contracts/patches/brlc-token.patch

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions e2e-contracts/test-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ test() {
npx hardhat test --bail --network stratus test/$test.test.ts
result_code=$?

# restore original files
git restore .

# go back to previous directory
cd -

Expand Down
16 changes: 15 additions & 1 deletion static/contracts/BRLCToken.signatures
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ b112e196: approveFreezing()
a8d775b6: assignPurposes(address,bytes32[])
5be35263: assignedPurposes(address)
70a08231: balanceOf(address)
8a1259fe: balanceOfComplex(address)
a6dc84f0: balanceOfFrozen(address)
863f67a1: balanceOfPremint(address)
5ef7f091: balanceOfRestricted(address,bytes32)
f9f92be4: blacklist(address)
e5c7160b: blocklist(address)
42966c68: burn(uint256)
001db792: configureBlocklister(address,bool)
860ad0a4: configureMaxPendingPremintsCount(uint16)
4e44d956: configureMinter(address,uint256)
c58f317d: configureTrustedAccount(address,bool)
313ce567: decimals()
a457c2d7: decreaseAllowance(address,uint256)
f04f29eb: enableBlocklist(bool)
Expand All @@ -20,6 +24,7 @@ bdd3a38f: freezeApproval(address)
266565a9: frozenBalance(address)
dc1caf3f: getAfterTokenTransferHooks()
116302d2: getBeforeTokenTransferHooks()
4a9f3278: getPremints(address)
39509351: increaseAllowance(address,uint256)
4cd88b76: initialize(string,string)
6bcf7fe3: isBRLCoin()
Expand All @@ -28,16 +33,18 @@ fe575a87: isBlacklisted(address)
8e204c43: isBlocklisted(address)
47401e14: isBlocklister(address)
aa271e1a: isMinter(address)
ebf1383f: isTrustedAccount(address)
e4380539: mainBlocklister()
bf2fa22b: mainMinter()
f3edcb27: maxPendingPremintsCount()
40c10f19: mint(address,uint256)
8a6db9c3: minterAllowance(address)
06fdde03: name()
8da5cb5b: owner()
8456cb59: pause()
5c975abb: paused()
9fd0506d: pauser()
f7bb5c88: premint(address,uint256,uint256)
16c33f84: premint(address,uint256,uint256,uint8)
3092afd5: removeMinter(address)
715018a6: renounceOwnership()
b2118a8d: rescueERC20(address,address,uint256)
Expand Down Expand Up @@ -71,9 +78,12 @@ cecd8222: FreezingNotApproved()
0522a022: MaxPendingPremintsCountAlreadyConfigured()
fb2deceb: MaxPendingPremintsLimitReached()
0f5d8c27: PremintReleaseTimePassed()
a2524939: PremintRestrictionFailure()
b1dc6115: PremintUnchanged()
709e2c14: TransferExceededFrozenAmount()
bc260d1b: TransferExceededPremintedAmount()
e96a60ef: TransferExceededRestrictedAmount()
95abf2d9: TrustedAccountAlreadyConfigured()
07768670: UnauthorizedBlocklister(address)
07349a1d: UnauthorizedMainBlocklister(address)
72b0340d: UnauthorizedMainMinter(address)
Expand All @@ -83,6 +93,7 @@ c7a3e880: UnauthorizedRescuer(address)
5da07de5: ZeroAddressToBlocklist()
97b9d4c4: ZeroBurnAmount()
215b990c: ZeroMintAmount()
71fcb179: ZeroPremintAmount()
2a11ebd3: ZeroPurpose()

Event signatures:
Expand All @@ -102,15 +113,18 @@ bebabe862f007498b2c8d1696d0a6140092bc96ce3d1b0d739fac6fe3fa03470: FreezeTransfer
7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498: Initialized(uint8)
d812f31f4dad318816d4c01dadf7d16795df36df1a0b3b7c4716ebf119b753a2: MainBlockListerChanged(address)
94a1d945505bf46d66861bec296a0035cef6cf54462f3f2202fa15477ca34f37: MainMinterChanged(address)
8641d99956c716649257289558a2b024f456806564ac6748b0d83ad88d36df2d: MaxPendingPremintsCountConfigured(uint256)
ab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8: Mint(address,address,uint256)
46980fca912ef9bcdbd36877427b6b90e860769f604e89c0e67720cece530d20: MinterConfigured(address,uint256)
e94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692: MinterRemoved(address)
8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0: OwnershipTransferred(address,address)
62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258: Paused(address)
b80482a293ca2e013eda8683c9bd7fc8347cfdaeea5ede58cba46df502c2a604: PauserChanged(address)
ec0cd90c7b6f0150e0aac398f3faa16a7ac53c60b84e3b1ea17aedc48858f3ac: Premint(address,address,uint256,uint256,uint256)
e475e580d85111348e40d8ca33cfdd74c30fe1655c2d8537a13abc10065ffa5a: RescuerChanged(address)
36a9e0b95197cc2414aa6bf0e005905bcd9645087d04c0b984507e08f8f19264: SelfBlocklisted(address)
ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef: Transfer(address,address,uint256)
7cf80b165e8243b32218f22b57abfa5ab415fb2510e0f6a3ca51106bc7d690d3: TrustedAccountConfigured(address,bool)
bc3fe0fc667d12a7a22748747f024a7d971127ffc48f6622675d3e97a2591a51: UnBlocklisted(address)
5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa: Unpaused(address)
8a02b5504957d932661cb8688c083945e213a5ead916da39238245c700c07ac4: UpdateRestriction(address,bytes32,uint256,uint256)
27 changes: 27 additions & 0 deletions static/contracts/BalanceTracker.signatures
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Function signatures:
904e2a82: INITIALIZATION_DAY()
20af2412: NEGATIVE_TIME_SHIFT()
82bfefc8: TOKEN()
49b7b37d: _balanceRecords(address,uint256)
df6258be: afterTokenTransfer(address,address,uint256)
7cbab1c7: beforeTokenTransfer(address,address,uint256)
dffcf6c0: dayAndTime()
34d9ac15: getDailyBalances(address,uint256,uint256)
8129fc1c: initialize()
8da5cb5b: owner()
f21f8760: readBalanceRecord(address,uint256)
715018a6: renounceOwnership()
fc0c546a: token()
f2fde38b: transferOwnership(address)

Error signatures:
0666bcba: FromDayPriorInitDay()
1dd3c0a0: SafeCastOverflowUint16()
a9627746: SafeCastOverflowUint240()
f1f88d16: ToDayPriorFromDay()
d86ad9cf: UnauthorizedCaller(address)

Event signatures:
8d995e7fbf7a5ef41cee9e6936368925d88e07af89306bb78a698551562e683c: BalanceRecordCreated(address,uint16,uint240)
7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498: Initialized(uint8)
8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0: OwnershipTransferred(address,address)
6 changes: 6 additions & 0 deletions static/contracts/PixCashier.signatures
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ e63ab1e9: PAUSER_ROLE()
e5c7160b: blocklist(address)
e3541348: cashIn(address,uint256,bytes32)
06efe2d6: cashInBatch(address[],uint256[],bytes32[],bytes32)
c345b864: cashInPremint(address,uint256,bytes32,uint256)
e86145c8: cashInPremintRevoke(bytes32,uint256)
b733bb84: cashInPremintUpdate(uint256,bytes32,uint256)
d485e8bf: cashOutBalanceOf(address)
96738714: confirmCashOut(bytes32)
09451818: confirmCashOutBatch(bytes32[])
Expand Down Expand Up @@ -47,8 +50,10 @@ Error signatures:
7ee34630: CashInAlreadyExecuted(bytes32)
de57d75e: CashInBatchAlreadyExecuted(bytes32)
a41c246c: EmptyTransactionIdsArray()
c19f538b: InappropriateCashInStatus(bytes32,uint8)
84e6fe28: InappropriateCashOutAccount(bytes32,address)
8e547672: InappropriateCashOutStatus(bytes32,uint8)
4981ac67: InappropriatePremintReleaseTime()
70bd0e00: InvalidBatchArrays()
a636f0c5: TokenMintingFailure()
bfcf3c0b: ZeroAccount()
Expand All @@ -61,6 +66,7 @@ Event signatures:
917c251bb231c4b997a420bebe47edad5c20e70715da16c38e9b2e172e44ab92: Blocklisted(address)
97a0bec022dc6ac1ebecc8ea2b7058cf29dc7753458a562ff74c8b60b1a41c26: CashIn(address,uint256,bytes32)
d6e8be24cc32a6b7965a3cc71dbbaa32b99a2949bbd0e631445c0ac235ed0396: CashInBatch(bytes32,bytes32[],uint8[])
d889c59257da3a7688817d38ea2c09f9d626dbe8f4a79303d98df645bb37d758: CashInPremint(address,uint256,uint256,bytes32,uint256)
73be2fd0252d8f4a508e5998cbde717696188f410e1eb423ad2bd59ce755a9d2: ConfirmCashOut(address,uint256,uint256,bytes32)
7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498: Initialized(uint8)
62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258: Paused(address)
Expand Down
104 changes: 104 additions & 0 deletions static/contracts/YieldStreamer.signatures
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
Function signatures:
2d11c58a: FEE_RATE()
1de5e06f: MAX_DAILY_BALANCE_LIMIT()
d731c4f6: MIN_CLAIM_AMOUNT()
7067e881: RATE_FACTOR()
d275cc63: ROUNDING_COEF()
f13e43fe: assignAccountGroup(bytes32,address[])
19139092: balanceTracker()
f9f92be4: blacklist(address)
e5c7160b: blocklist(address)
99a5d747: calculateFee(uint256)
cc2afffa: calculateStream(uint256,uint256)
93f715d8: calculateYieldByDays(address,uint256,uint256,uint256)
379607f5: claim(uint256)
2537cbc2: claimAllPreview(address)
087267db: claimPreview(address,uint256)
001db792: configureBlocklister(address,bool)
f0decb6b: configureLookBackPeriod(uint256,uint256)
0e3cbdc0: configureYieldRate(bytes32,uint256,uint256)
dffcf6c0: dayAndTime()
f04f29eb: enableBlocklist(bool)
b3f00674: feeReceiver()
964b5fca: getAccountYieldRates(address)
34d9ac15: getDailyBalances(address,uint256,uint256)
2368d18c: getDailyBalancesWithYield(address,uint16,uint16)
4545d7b0: getGroupYieldRates(bytes32)
a4f89d9e: getLastClaimDetails(address)
034258b7: getLookBackPeriods()
8129fc1c: initialize()
fe575a87: isBlacklisted(address)
25fa37de: isBlocklistEnabled()
8e204c43: isBlocklisted(address)
47401e14: isBlocklister(address)
e4380539: mainBlocklister()
8da5cb5b: owner()
8456cb59: pause()
5c975abb: paused()
9fd0506d: pauser()
715018a6: renounceOwnership()
b2118a8d: rescueERC20(address,address,uint256)
38a63183: rescuer()
d2156be2: selfBlacklist()
7dab5935: selfBlocklist()
598b75ad: setBalanceTracker(address)
efdcd974: setFeeReceiver(address)
ade847e4: setMainBlocklister(address)
2d88af4a: setPauser(address)
cd5cecf8: setRescuer(address)
fc0c546a: token()
f2fde38b: transferOwnership(address)
1a895266: unBlacklist(address)
31b23020: unBlocklist(address)
3f4ba83a: unpause()
4f1aef49: updateLookBackPeriod(uint256,uint256,uint256)
68e073c2: updateYieldRate(bytes32,uint256,uint256,uint256)

Error signatures:
11b61b6a: AlreadyConfigured()
4b3f6880: BalanceTrackerAlreadyConfigured()
417933b9: BlocklistedAccount(address)
241fb311: ClaimAmountBelowMinimum()
7f98fde9: ClaimAmountNonRounded()
17c62205: ClaimRejectionDueToShortfall(uint256)
3b511c76: FeeReceiverAlreadyConfigured()
deb93f59: GroupAlreadyAssigned(address)
8e1b3a42: LookBackPeriodCountLimit()
f0ac7983: LookBackPeriodInvalidEffectiveDay()
492cd027: LookBackPeriodInvalidParametersCombination()
83fa7f8b: LookBackPeriodLengthAlreadyConfigured()
ce65c0c2: LookBackPeriodLengthZero()
9e9ff8e1: LookBackPeriodWrongIndex()
1dd3c0a0: SafeCastOverflowUint16()
a9627746: SafeCastOverflowUint240()
f1f88d16: ToDayPriorFromDay()
07768670: UnauthorizedBlocklister(address)
07349a1d: UnauthorizedMainBlocklister(address)
ae3b56d5: UnauthorizedPauser(address)
c7a3e880: UnauthorizedRescuer(address)
be113e9f: YieldRateInvalidEffectiveDay()
3cb2bc10: YieldRateValueAlreadyConfigured()
ae9114d1: YieldRateWrongIndex()
5da07de5: ZeroAddressToBlocklist()

Event signatures:
090169477b750f56ca536f50fb3f76bcf841b6970f1be25bd0845e26584a1559: AccountGroupAssigned(bytes32,address)
79a164b9509a6d0f45878e8d7205eb03edbc52d20c056df08535d5efdd634915: BalanceTrackerChanged(address,address)
f9e980fc4cb715a065afbab5e812bd225b2523b03a481511cc4c4c6c15a2d68e: BlocklistEnabled(bool)
917c251bb231c4b997a420bebe47edad5c20e70715da16c38e9b2e172e44ab92: Blocklisted(address)
7af80f70ae054271acff70f98f71a9dce90df18449fbda8a96cba93816ec90a4: BlocklisterConfigured(address,bool)
34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf7: Claim(address,uint256,uint256)
a4b009cc442411b602eaf94bc0579b6abdb8fd90b4ef5b9426e270038906bd03: FeeReceiverChanged(address,address)
7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498: Initialized(uint8)
a131b2f9f128487233977b2b53fe5884517875df10955a020176f9cc1706b184: LookBackPeriodConfigured(uint256,uint256)
c19764b8b06f4727b91cf251056039bf34d266d4048675a4781fc87df479a7b3: LookBackPeriodUpdated(uint256,uint256,uint256,uint256,uint256)
d812f31f4dad318816d4c01dadf7d16795df36df1a0b3b7c4716ebf119b753a2: MainBlockListerChanged(address)
8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0: OwnershipTransferred(address,address)
62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258: Paused(address)
b80482a293ca2e013eda8683c9bd7fc8347cfdaeea5ede58cba46df502c2a604: PauserChanged(address)
e475e580d85111348e40d8ca33cfdd74c30fe1655c2d8537a13abc10065ffa5a: RescuerChanged(address)
36a9e0b95197cc2414aa6bf0e005905bcd9645087d04c0b984507e08f8f19264: SelfBlocklisted(address)
bc3fe0fc667d12a7a22748747f024a7d971127ffc48f6622675d3e97a2591a51: UnBlocklisted(address)
5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa: Unpaused(address)
3342c4fd4f37fc9d60fe177d206eb8f9c86fcfe03f501f99e29a8995e9f801eb: YieldRateConfigured(bytes32,uint256,uint256)
61e0fa3cc0ef8c1da3eac41086cd82df2f04b16fb3ccf7c23082d07ffbda3fea: YieldRateUpdated(bytes32,uint256,uint256,uint256,uint256,uint256)

0 comments on commit 9220214

Please sign in to comment.