0.0.6 • Published 9 months ago

@onflow/six-usdc-setup v0.0.6

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

@onflow/six-usdc-setup

Stored Interaction for setting up a USDC Vault and Receiver

Status

  • Last Updated: March 21 2022
  • Stable: No
  • Risk of Breaking Change: Very High

Known Upcoming Changes:

  • Potential changes to all aspects of Stored Interactions

Install

npm install @onflow/six-usdc-setup

Configuration

To use this Stored Interaction, you must configure FCL with certain account addresses which contain contracts imported by this Stored Interaction.

DependenciesMainnetTestnet
0xFUNGIBLETOKENADDRESS0xf233dcee88fe0abe0x9a0766d93b6608b7
0xUSDCADDRESS0xb19436aae4d946220x1ab3c177460e1e4a

Example (for mainnet):

fcl.config()
  .put("0xFUNGIBLETOKENADDRESS", "0xf233dcee88fe0abe")
  .put("0xUSDCADDRESS", "0xb19436aae4d94622")

Example (for testnet):

fcl.config()
  .put("0xFUNGIBLETOKENADDRESS", "0x9a0766d93b6608b7")
  .put("0xUSDCADDRESS", "0x1ab3c177460e1e4a")

Learn more about configuring FCL here: https://github.com/onflow/fcl-six/blob/master/docs/configure-fcl.mdx

Usage:

import * as fcl from "@onflow/fcl"
import { template as usdcSetup } from "@onflow/six-usdc-setup"

fcl.config().put("accessNode", "http://localhost:8080");

const response = await fcl.send([
    usdcSetup({
        proposer: fcl.currentUser().authorization,
        authorization: fcl.currentUser().authorization,     
        payer: fcl.currentUser().authorization,             
    })
])

Hashing

Hashing Code:

    console.log(crypto.createHash('sha256').update(CODE, 'utf8').digest('hex'))
0.0.4-alpha.0

10 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.6

9 months ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago