From 0ccff22dcc94770bff2196d8b8522f516924b213 Mon Sep 17 00:00:00 2001 From: Austin Kline Date: Fri, 29 Sep 2023 06:39:04 -1000 Subject: [PATCH] include all cadence contracts --- contracts/hybrid-custody/factories/FTAllFactory.cdc | 2 +- .../factories/FTReceiverBalanceFactory.cdc | 10 ++++++++++ package.json | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 contracts/hybrid-custody/factories/FTReceiverBalanceFactory.cdc diff --git a/contracts/hybrid-custody/factories/FTAllFactory.cdc b/contracts/hybrid-custody/factories/FTAllFactory.cdc index 46f506b..3b8facd 100644 --- a/contracts/hybrid-custody/factories/FTAllFactory.cdc +++ b/contracts/hybrid-custody/factories/FTAllFactory.cdc @@ -4,7 +4,7 @@ import "FungibleToken" pub contract FTAllFactory { pub struct Factory: CapabilityFactory.Factory { pub fun getCapability(acct: &AuthAccount, path: CapabilityPath): Capability { - return acct.getCapability<&{FungibleToken.Provider, FungibleToken.Receiver, FungibleToken.Balance}>(path) + return acct.getCapability<&{FungibleToken.Provider, FungibleToken.Balance, FungibleToken.Receiver}>(path) } } } \ No newline at end of file diff --git a/contracts/hybrid-custody/factories/FTReceiverBalanceFactory.cdc b/contracts/hybrid-custody/factories/FTReceiverBalanceFactory.cdc new file mode 100644 index 0000000..49673d5 --- /dev/null +++ b/contracts/hybrid-custody/factories/FTReceiverBalanceFactory.cdc @@ -0,0 +1,10 @@ +import "CapabilityFactory" +import "FungibleToken" + +pub contract FTReceiverBalanceFactory { + pub struct Factory: CapabilityFactory.Factory { + pub fun getCapability(acct: &AuthAccount, path: CapabilityPath): Capability { + return acct.getCapability<&{FungibleToken.Receiver, FungibleToken.Balance}>(path) + } + } +} \ No newline at end of file diff --git a/package.json b/package.json index a755ab8..0fde0a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@flowtyio/flow-contracts", - "version": "0.0.8", + "version": "0.0.10", "main": "index.json", "description": "An NPM package for common flow contracts", "author": "flowtyio", @@ -28,7 +28,7 @@ "files": [ "*.js", "index.json", - "contracts/*.cdc", + "contracts/**/*.cdc", "flow.json", "README.md", "LICENSE"