How to use the synthetix.getTarget function in synthetix

To help you get started, we’ve selected a few synthetix examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Synthetixio / synthetix-js / __tests__ / src / contracts / EscrowChecker.js View on Github external
test(`${network} must return escrow contract address`, async () => {
      const escrowAddress = await snxjs[contract].synthetix_escrow();
      const expectedAddress = snx.getTarget({ network, contract: 'SynthetixEscrow' }).address;
      expect(escrowAddress).toEqual(expectedAddress);
    });
  });
github Synthetixio / synthetix-js / __tests__ / src / contracts / Synth.js View on Github external
async () => {
            const synthetixProxy = await snxjs[synth].synthetixProxy();
            const expectedAddress = snx.getTarget({ network, contract: 'ProxySynthetix' }).address;
            expect(synthetixProxy).toEqual(expectedAddress);
          },
          15000
github Synthetixio / synthetix-js / tools / abitojs.js View on Github external
.map(network => {
      const targets = snx.getTarget({ network });

      return `
        const ${network.toUpperCase()}_ADDRESSES = {
          ${Object.keys(targets)
            .map(name => `${name}: '${targets[name].address}'`)
            .join(',\n')}
        };`;
    })
    .join('\n\n');

synthetix

The smart contracts which make up the Synthetix system. (synthetix.io)

MIT
Latest version published 25 days ago

Package Health Score

75 / 100
Full package analysis