Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Commit

Permalink
added new transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjarte Stien Karlsen committed Apr 25, 2021
1 parent 16464ba commit 13f78d1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tasks/unlink/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"github.com/bjartek/go-with-the-flow/gwtf"
)

//NB! start from root dir with makefile
func main() {

flow := gwtf.NewGoWithTheFlowEmulator()
flow.CreateAccount("marketplace", "artist", "buyer1", "buyer2")

flow.TransactionFromFile("unlink_flow").SignProposeAndPayAs("buyer1").RunPrintEventsFull()
flow.TransactionFromFile("setup/mint_tokens").SignProposeAndPayAsService().AccountArgument("buyer1").UFix64Argument("1000.0").RunPrintEventsFull()
}
16 changes: 16 additions & 0 deletions transactions/unlink_art.cdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


//local emulator
import FungibleToken from 0xee82856bf20e2aa6
import NonFungibleToken, Content, Art, Auction, Versus from 0xf8d6e0586b0a20c7
//testnet
//import Versus from 0x01cf0e2f2f715450

transaction() {
prepare(account: AuthAccount) {
//never do this.. extremely dangerous
log("Unlinking art for ".concat(account.address.toString()))
account.unlink(Art.CollectionPublicPath)
}
}
8 changes: 8 additions & 0 deletions transactions/unlink_flow.cdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

transaction() {
prepare(account: AuthAccount) {
//never do this.. extremely dangerous
log("Unlinking flowTokenReciver for ".concat(account.address.toString()))
account.unlink(/public/flowTokenReceiver)
}
}

0 comments on commit 13f78d1

Please sign in to comment.