@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
27 lines • 1.12 kB
JavaScript
import { expect } from 'chai';
import { TestChainName } from '../consts/testChains.js';
import { MultiProvider } from '../providers/MultiProvider.js';
import { buildAgentConfig } from './agentConfig.js';
describe('Agent config', () => {
const args = [
[TestChainName.test1],
MultiProvider.createTestMultiProvider(),
{
test1: {
mailbox: '0xmailbox',
interchainGasPaymaster: '0xgas',
validatorAnnounce: '0xannounce',
merkleTreeHook: '0xmerkle',
},
},
{ test1: 0 },
];
it('Should generate a new agent config', () => {
const result = buildAgentConfig(...args);
expect(result.chains[TestChainName.test1].mailbox).to.equal('0xmailbox');
expect(result.chains[TestChainName.test1].interchainGasPaymaster).to.equal('0xgas');
expect(result.chains[TestChainName.test1].validatorAnnounce).to.equal('0xannounce');
expect(result.chains[TestChainName.test1].merkleTreeHook).to.equal('0xmerkle');
});
});
//# sourceMappingURL=agentConfig.test.js.map