Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fungible Token Switchboard contract and tests (#71)
* Switchboard contract skeleton * Added test node_modules to gitignore * example token first test * example token mint tokens test * example token transfer tokens test * burn tokens test, comments and a little bit of code cleanup * add switchboard manager interface, removecapabilty function header * post conditions and prepare-execute (#68) * First uncomented version of contract * removed SwitchboardManager interface * Switchboard resource creation and setup account tx * Switchboard tests and folder restruct * Transfer tokens through switchboard tx * Packed all test in one file * Added tx for adding and removing ft vault capabilities to switchboard * Missing receiver public path * Fixed addVaultCapability function, type of capability instead of type of reference was beeing used as dictionary key * linking a capability just to a <&{FungibleToken.Receiver> rather than to a <&FungibleTokenSwitchboard.Switchboard{FungibleToken.Receiver}> * Actually linking a Switchboard receiver, but keep borrowing an AnyResource receiver * fixed test for removing capabilities * Full contract comments, added deposit to SwitchboardPublic interface, changed SwitchboardReceiverPublicPath to the royalties standard path * get vault capabilities script and test for it * Commented properly every transaction * go test passed * Fixed removeVaultCapability function. emit VaultCapabilityAdded and VaultCapabilityRemoved in the corresponding functions * Pushed bad flow.json file * Move js test from project root to lib/js * Rename path variable names * Remove FungibleTokenSwitchboardInitialized event * Fix typo in comment * Fix more comment typos * Simplify vault receivers fields and function names * Make the receiverCapabilities field from switchboard resource private to contract * Include js test in makefile * Add node and npm modules to github ci * Add dependencies lock file to github ci * Add script test to package-lock.json * Add npm install to lib/js/test makefile * Add flow cli and npm dependencies to github actions * Remove SwitchboardInitialized event * Add assertions to balance involved tests * Correct test name * Change getVaultCapabilities for getVaultTypes * Add safeDeposit function to switchboard. Add safe_transfer tx and tests * Add first draft of addNewVaultsByPath function * Add test for addVaultCapabilitiesByPath * Add switchboard documentation * Make addVault functions not to accept already present vaults * Update comment Co-authored-by: Joshua Hannan <[email protected]> * Update comments Co-authored-by: Joshua Hannan <[email protected]> * Add optional owner parameters to vault events * Update README.md Line 199 Co-authored-by: Joshua Hannan <[email protected]> * Update README.md Line 203 Co-authored-by: Joshua Hannan <[email protected]> * Update README.md Line 209 Co-authored-by: Joshua Hannan <[email protected]> * Update README.md Line 239 Co-authored-by: Joshua Hannan <[email protected]> * Update README.md Line 240 Co-authored-by: Joshua Hannan <[email protected]> * Update README.md Line 272 Co-authored-by: Joshua Hannan <[email protected]> * Update README.md Line 303 Co-authored-by: Joshua Hannan <[email protected]> * Make safeDeposit function return an optional Vault * Fix ci * Include receiverPath as a parameter for transfer_tokens transaction. WARNING: Test failing due to js test framework not supporting PublicPath as a parameter for transactions, feature has been tested on playground * Add NotCompletedDeposit event to safeDeposit function * Modify getVaultTypes method to return only the types of the capabilities that can be borrowed when the method is called * Add review improvements * Cleanup * Polish comments Co-authored-by: Joshua Hannan <[email protected]>
- Loading branch information