
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@bgd-labs/governance-v3-js-utils
Advanced tools
This repository contains helper functions to interact with governance v3 contracts.
This repository contains helper functions to interact with governance v3 contracts.
npm i @bgd-labs/governance-v3-js-utils
yarn add @bgd-labs/governance-v3-js-utils
import { baseSlots, AssetsBalanceSlots, Asset } from '@bgd-labs/governance-v3-ethers-utils/dist/utils';
import { getVotingProofs } from '@bgd-labs/governance-v3-js-utils/dist/viem';
import { eGetVotingProofs } from '@bgd-labs/governance-v3-js-utils/dist/ether';
import { AaveV3Ethereum, AaveSafetyModule, GovernanceV3Ethereum } from '@bgd-labs/aave-address-book';
const assets = {
aaveAddress: AaveV3Ethereum.ASSETS.AAVE.UNDERLYING,
aAaveAddress: AaveV3Ethereum.ASSETS.AAVE.A_TOKEN,
stkAAVEAddress: AaveSafetyModule.STK_AAVE,
contractAddress: GovernanceV3Ethereum.GOVERNANCE,
}
const assetsBalanceSlots: AssetsBalanceSlots = {
[assets.stkAAVEAddress.toLowerCase()]: {
...baseSlots[Asset.STKAAVE],
},
[assets.aAaveAddress.toLowerCase()]: {
...baseSlots[Asset.AAAVE],
},
[assets.aaveAddress.toLowerCase()]: {
...baseSlots[Asset.AAVE],
},
[assets.contractAddress.toLowerCase()]: {
...baseSlots[Asset.GOVCORE],
},
};
const formattedBalances = [{
underlyingAsset: assets.aaveAddress, // address of voting asset
value: "100", // total balance (user balance + delegated voting power) on voting block
userBalance: "100", // should be real user balance on voting block (not current))
isWithDelegatedPower: false, // value !== userBalance (on voting block)
}]
// getting balance proofs for voting viem
const proofs = await getVotingProofs({
client: govCoreViemClient, // viem client
blockHash: proposal.snapshotBlockHash, // from proposal data
balances: formattedBalances,
address: voterAddress, // voter asset (signer or representation address)
aAaveAddress: assets.aAaveAddress,
slots: assetsBalanceSlots,
});
// getting balance proofs for voting ether js v5
const proofsEtherJs = await eGetVotingProofs({
provider: govCoreRPCProvider, // ether js v5 provider
blockHash: proposal.snapshotBlockHash, // from proposal data
balances: formattedBalances,
address: voterAddress, // voter asset (signer or representation address)
aAaveAddress: assets.aAaveAddress,
slots: assetsBalanceSlots,
});
Copyright © 2024, BGD Labs. Released under the MIT License.
FAQs
This repository contains helper functions to interact with governance v3 contracts.
We found that @bgd-labs/governance-v3-js-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.