Skip to content

Commit

Permalink
Merge pull request #14 from vechain/feat/add-testnet-addresses
Browse files Browse the repository at this point in the history
feat: added testnet addresses
  • Loading branch information
Agilulfo1820 authored Jul 23, 2024
2 parents 0041021 + 84398fb commit 1c64b76
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 12 deletions.
19 changes: 19 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,30 @@ The complete documentation for the VeBetterDAO and the contracts can be found [h
"XAllocationVoting": "0x89A00Bb0947a30FF95BEeF77a66AEdE3842Fe5B7"
```

## Testnet contract addresses

```
"B3TR": "0xbf64cf86894Ee0877C4e7d03936e35Ee8D8b864F",
"B3TRGovernor": "0xDF5E114D391CAC840529802fe8D01f6bdeBE41eC",
"Emissions": "0x148d21032F4a7b4aeF236E2E9C0c5bF62d10f8EB",
"GalaxyMember": "0xCf73039913e05aa1838d5869E72290d2b454C1E8",
"TimeLock": "0x30ee94F303643902a68aD8A7A6456cA69d763192",
"Treasury": "0x039893EBe092A2D22B08E2b029735D211bfF7F50",
"VOT3": "0xa704c45971995467696EE9544Da77DD42Bc9706E",
"VoterRewards": "0x2E47fc4aabB3403037fB5E1f38995E7a91Ce8Ed2",
"X2EarnApps": "0xcB23Eb1bBD5c07553795b9538b1061D0f4ABA153",
"X2EarnRewardsPool": "0x5F8f86B8D0Fa93cdaE20936d150175dF0205fB38",
"XAllocationPool": "0x9B9CA9D0C41Add1d204f90BA0E9a6844f1843A84",
"XAllocationVoting": "0x5859ff910d8b0c127364c98E24233b0af7443c1c",
"B3TRFaucet": "0x5e9c1F0f52aC6b5004122059053b00017EAfB561"
```

## Audit

The VeBetterDAO smart contracts have undergone a comprehensive audit by [Hacken](https://hacken.io/). The audit report (`Hacken_Vechain Foundation_[SCA] VeChain _ VeBetter DAO _ May2024_P-2024-304_1_20240621 16_17`) can be found in the root of the repo.

## Install via NPM

You can install the package via NPM to get the ABIs, contract addresses and interfaces:

```bash
Expand Down
14 changes: 14 additions & 0 deletions addresses/testnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"B3TR": "0xbf64cf86894Ee0877C4e7d03936e35Ee8D8b864F",
"B3TRGovernor": "0xDF5E114D391CAC840529802fe8D01f6bdeBE41eC",
"Emissions": "0x148d21032F4a7b4aeF236E2E9C0c5bF62d10f8EB",
"GalaxyMember": "0xCf73039913e05aa1838d5869E72290d2b454C1E8",
"TimeLock": "0x30ee94F303643902a68aD8A7A6456cA69d763192",
"Treasury": "0x039893EBe092A2D22B08E2b029735D211bfF7F50",
"VOT3": "0xa704c45971995467696EE9544Da77DD42Bc9706E",
"VoterRewards": "0x2E47fc4aabB3403037fB5E1f38995E7a91Ce8Ed2",
"X2EarnApps": "0xcB23Eb1bBD5c07553795b9538b1061D0f4ABA153",
"X2EarnRewardsPool": "0x5F8f86B8D0Fa93cdaE20936d150175dF0205fB38",
"XAllocationPool": "0x9B9CA9D0C41Add1d204f90BA0E9a6844f1843A84",
"XAllocationVoting": "0x5859ff910d8b0c127364c98E24233b0af7443c1c"
}
61 changes: 49 additions & 12 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import mainnetAddresses from "./addresses/mainnet.json"
import testnetAddresses from "./addresses/testnet.json"

import {
VOT3__factory,
Expand All @@ -17,61 +18,97 @@ import {

export const B3TR = {
abi: B3TR__factory.abi,
address: mainnetAddresses.B3TR,
address: {
mainnet: mainnetAddresses.B3TR,
testnet: testnetAddresses.B3TR,
},
interface: B3TR__factory.createInterface(),
}
export const B3TRGovernor = {
abi: B3TRGovernor__factory.abi,
address: mainnetAddresses.B3TRGovernor,
address: {
mainnet: mainnetAddresses.B3TRGovernor,
testnet: testnetAddresses.B3TRGovernor,
},
interface: B3TRGovernor__factory.createInterface(),
}
export const Emissions = {
abi: Emissions__factory.abi,
address: mainnetAddresses.Emissions,
address: {
mainnet: mainnetAddresses.Emissions,
testnet: testnetAddresses.Emissions,
},
interface: Emissions__factory.createInterface(),
}
export const GalaxyMember = {
abi: GalaxyMember__factory.abi,
address: mainnetAddresses.GalaxyMember,
address: {
mainnet: mainnetAddresses.GalaxyMember,
testnet: testnetAddresses.GalaxyMember,
},
interface: GalaxyMember__factory.createInterface(),
}
export const TimeLock = {
abi: TimeLock__factory.abi,
address: mainnetAddresses.TimeLock,
address: {
mainnet: mainnetAddresses.TimeLock,
testnet: testnetAddresses.TimeLock,
},
interface: TimeLock__factory.createInterface(),
}
export const Treasury = {
abi: Treasury__factory.abi,
address: mainnetAddresses.Treasury,
address: {
mainnet: mainnetAddresses.Treasury,
testnet: testnetAddresses.Treasury,
},
interface: Treasury__factory.createInterface(),
}
export const VOT3 = {
abi: VOT3__factory.abi,
address: mainnetAddresses.VOT3,
address: {
mainnet: mainnetAddresses.VOT3,
testnet: testnetAddresses.VOT3,
},
interface: VOT3__factory.createInterface(),
}
export const VoterRewards = {
abi: VoterRewards__factory.abi,
address: mainnetAddresses.VoterRewards,
address: {
mainnet: mainnetAddresses.VoterRewards,
testnet: testnetAddresses.VoterRewards,
},
interface: VoterRewards__factory.createInterface(),
}
export const X2EarnApps = {
abi: X2EarnApps__factory.abi,
address: mainnetAddresses.X2EarnApps,
address: {
mainnet: mainnetAddresses.X2EarnApps,
testnet: testnetAddresses.X2EarnApps,
},
interface: X2EarnApps__factory.createInterface(),
}
export const X2EarnRewardsPool = {
abi: X2EarnRewardsPool__factory.abi,
address: mainnetAddresses.X2EarnRewardsPool,
address: {
mainnet: mainnetAddresses.X2EarnRewardsPool,
testnet: testnetAddresses.X2EarnRewardsPool,
},
interface: X2EarnRewardsPool__factory.createInterface(),
}
export const XAllocationPool = {
abi: XAllocationPool__factory.abi,
address: mainnetAddresses.XAllocationPool,
address: {
mainnet: mainnetAddresses.XAllocationPool,
testnet: testnetAddresses.XAllocationPool,
},
interface: XAllocationPool__factory.createInterface(),
}
export const XAllocationVoting = {
abi: XAllocationVoting__factory.abi,
address: mainnetAddresses.XAllocationVoting,
address: {
mainnet: mainnetAddresses.XAllocationVoting,
testnet: testnetAddresses.XAllocationVoting,
},
interface: XAllocationVoting__factory.createInterface(),
}

0 comments on commit 1c64b76

Please sign in to comment.