Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing function Batch Relayer V6 #2550

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import "../vault/IVault.sol";
interface IBalancerRelayer {
function getLibrary() external view returns (address);

function getQueryLibrary() external view returns (address);

function getVault() external view returns (IVault);

function multicall(bytes[] calldata data) external payable returns (bytes[] memory results);
Expand Down
4 changes: 4 additions & 0 deletions pkg/standalone-utils/contracts/relayer/BalancerRelayer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ contract BalancerRelayer is IBalancerRelayer, Version, ReentrancyGuard {
return _library;
}

function getQueryLibrary() external view override returns (address) {
return _queryLibrary;
}

function multicall(bytes[] calldata data) external payable override nonReentrant returns (bytes[] memory results) {
uint256 numData = data.length;

Expand Down
6 changes: 5 additions & 1 deletion pkg/standalone-utils/test/BaseRelayerLibrary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { deploy, deployedAt } from '@balancer-labs/v2-helpers/src/contract';
import * as expectEvent from '@balancer-labs/v2-helpers/src/test/expectEvent';
import { actionId } from '@balancer-labs/v2-helpers/src/models/misc/actions';

import { ANY_ADDRESS, MAX_UINT256 } from '@balancer-labs/v2-helpers/src/constants';
import { ANY_ADDRESS, MAX_UINT256, ZERO_ADDRESS } from '@balancer-labs/v2-helpers/src/constants';
import Vault from '@balancer-labs/v2-helpers/src/models/vault/Vault';
import { BigNumberish, bn, fp } from '@balancer-labs/v2-helpers/src/numbers';
import { toChainedReference } from './helpers/chainedReferences';
Expand Down Expand Up @@ -48,6 +48,10 @@ describe('BaseRelayerLibrary', function () {
expect(await relayer.getLibrary()).to.equal(relayerLibrary.address);
});

it('returns the query library address', async () => {
expect(await relayer.getQueryLibrary()).not.to.equal(ZERO_ADDRESS);
});

it('returns the vault address', async () => {
expect(await relayer.getVault()).to.equal(vault.address);
});
Expand Down