[VPD-1185] feat: add TokenBuyBack deployments on bsctestnet#163
Merged
Conversation
fred-venus
approved these changes
May 12, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TokenBuybackinstances (RiskFund, XVS, Prime, Treasury variants) on bsctestnet and register their addresses.verifyDeploymenthelper and wire it into every deploy script so proxy + implementation get verified on BscScan automatically.DEPLOYER_PRIVATE_KEYfor bsctestnet and pull in@venusprotocol/venus-protocolexternal deployments; redeployRiskFundV2implementation.Changes
Deploy scripts
deploy/000-psr.ts…deploy/009-treasury-buyback.ts: switch handlers to receivehredirectly and callverifyDeployment(hre, name)after deployment / ownership transfer forProtocolShareReserve,RiskFundV2,RiskFundConverter,XVSVaultTreasury,SingleTokenConverterImp,SingleTokenConverterBeacon, allSingleTokenConverterinstances,ConverterNetwork,RiskFundBuyback, all Prime/TreasuryTokenBuybackinstances, andXVSBuyback.Verification helper
helpers/verify.ts(new): exportsverifyDeployment/verifyDeployments. Skipshardhat/localhost, skips whenETHERSCAN_API_KEYunset, verifies_Implementation+_Proxy(or main artifact when neither exists), tolerates "already verified" responses, logs failures without throwing.Hardhat config
hardhat.config.ts: addnode_modules/@venusprotocol/venus-protocol/deployments/bsctestnettoexternalDeployments.bsctestnet; bsctestnetaccountsnow usesDEPLOYER_PRIVATE_KEYinstead of the mnemonic.Deployments (bsctestnet)
TokenBuybackproxy + implementation artifacts and address-registry entries:RiskFundBuyback— proxy0x1a063a…71fE, impl0x9A3716…86D8XVSBuyback— proxy0x7b96F9…5a11, impl0x8a5E9a…c343UPrimeBuyback— proxy0xa9f091…07a4, impl0x26C451…e1d7USDTPrimeBuyback— proxy0xaAc507…ab55, impl0x9Ae32e…fadBBTCBTreasuryBuyback— proxy0x3AC5D1…feb6, impl0x95d174…89DdETHTreasuryBuyback— proxy0x721CCA…C35d, impl0x766fd2…8884USDCTreasuryBuyback— proxy0x90814c…0fF3, impl0x03EFea…6573USDTTreasuryBuyback— proxy0xBCF3Ef…a497, impl0xA65f35…29F5UTreasuryBuyback— proxy0x281d53…0C5C, impl0xDBE338…3412XVSTreasuryBuyback— proxy0x9d8d03…E773, impl0xC0C38f…9361RiskFundV2_Implementation→0xAAe9c6412A7EaeB82eD2bA8E9E2bBc27bDa921f6.deployments/bsctestnet.jsonanddeployments/bsctestnet_addresses.jsonaccordingly.Test plan
yarn hardhat compileclean.yarn hardhat deploy --network bsctestnet --tags RiskFundBuyback,XVSBuyback,PrimeBuyback,TreasuryBuybackis a no-op (skipIfAlreadyDeployed) and re-runsverifyDeploymentwithout errors.TokenBuyback, proxies =OptimizedTransparentUpgradeableProxy).RiskFundV2_Implementationat0xAAe9c6412A7EaeB82eD2bA8E9E2bBc27bDa921f6verified on BscScan.deployments/bsctestnet_addresses.jsoncontains all new entries with matching_Proxy/_Implementationpairs.