How to use the @celo/contractkit.CeloContract.GoldToken function in @celo/contractkit

To help you get started, we’ve selected a few @celo/contractkit 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 celo-org / celo-monorepo / packages / celotool / src / e2e-tests / transfer_tests.ts View on Github external
accounts.map(async (a) => {
        balances[a] = {
          [CeloContract.GoldToken]: await goldToken.balanceOf(a),
          [CeloContract.StableToken]: await stableToken.balanceOf(a),
        }
      })
    )
github celo-org / celo-monorepo / packages / celotool / src / e2e-tests / transfer_tests.ts View on Github external
describe('when not explicitly specifying a gas fee recipient', () =>
                  testTransferToken({
                    expectedGas: GOLD_TRANSACTION_GAS_COST,
                    transferToken: CeloContract.GoldToken,
                    feeToken: CeloContract.GoldToken,
                  }))
github celo-org / celo-monorepo / packages / celotool / src / e2e-tests / transfer_tests.ts View on Github external
describe('when not explicitly specifying a gas fee recipient', () =>
                  testTransferToken({
                    expectedGas: GOLD_TRANSACTION_GAS_COST,
                    transferToken: CeloContract.GoldToken,
                    feeToken: CeloContract.GoldToken,
                  }))
github celo-org / celo-monorepo / packages / notification-service / src / util / utils.ts View on Github external
export async function getTokenAddresses() {
  if (goldTokenAddress && stableTokenAddress) {
    return { goldTokenAddress, stableTokenAddress }
  } else {
    const kit = await getContractKit()
    goldTokenAddress = await kit.registry.addressFor(CeloContract.GoldToken)
    stableTokenAddress = await kit.registry.addressFor(CeloContract.StableToken)
    return { goldTokenAddress, stableTokenAddress }
  }
}
github celo-org / celo-monorepo / packages / dappkit / src / index.ts View on Github external
async function getFeeCurrencyContractAddress(
  kit: ContractKit,
  feeCurrency: FeeCurrency
): Promise {
  switch (feeCurrency) {
    case FeeCurrency.cUSD:
      return kit.registry.addressFor(CeloContract.StableToken)
    case FeeCurrency.cGLD:
      return kit.registry.addressFor(CeloContract.GoldToken)
    default:
      return kit.registry.addressFor(CeloContract.StableToken)
  }
}