@chorus-one/ethereum
Version:
All-in-one toolkit for building staking dApps on Ethereum network
33 lines (27 loc) • 1 kB
text/typescript
import { EthereumStaker } from '@chorus-one/ethereum'
import { assert } from 'chai'
import { Hex } from 'viem'
import { prepareTests } from './lib/utils'
import { disableHoodi } from './lib/disableHoodi'
describe('EthereumStaker.getVault', () => {
let validatorAddress: Hex
let staker: EthereumStaker
beforeEach(async () => {
const setup = await prepareTests()
validatorAddress = setup.validatorAddress
staker = setup.staker
})
it('returns vault details', async function () {
disableHoodi.bind(this)()
const { vault } = await staker.getVault({
validatorAddress
})
assert.equal(vault.name, 'Chorus One - MEV Max')
assert.isTrue(Number(vault.tvl) > 1000 * 10 ** 18)
assert.isTrue(
vault.description ===
'Chorus One’s ground-breaking MEV research ensures the highest yields with top-tier security and enterprise-level infrastructure. Start staking ETH today.'
)
assert.isTrue(/^https?:\/\/.*.png$/.test(vault.logoUrl))
})
})