Skip to content

Commit

Permalink
reorganize txs and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Apr 3, 2024
1 parent a9c3316 commit ff7e7cb
Show file tree
Hide file tree
Showing 15 changed files with 206 additions and 204 deletions.
392 changes: 196 additions & 196 deletions lib/go/templates/internal/assets/assets.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/go/templates/script_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const (
scriptsPath = "scripts/"
readBalanceFilename = "get_balance.cdc"
readSupplyFilename = "get_supply.cdc"
readSupplyViewFilename = "metadata/get_vault_supply_view.cdc"
readSupplyViewFilename = "metadata/scripts/get_vault_supply_view.cdc"
)

// GenerateInspectVaultScript creates a script that retrieves a
Expand All @@ -34,7 +34,7 @@ func GenerateInspectSupplyScript(env Environment) []byte {
// the total supply of tokens in existence through a metadata view
func GenerateInspectSupplyViewScript(env Environment) []byte {

code := assets.MustAssetString(scriptsPath + readSupplyViewFilename)
code := assets.MustAssetString(readSupplyViewFilename)

return []byte(ReplaceAddresses(code, env))
}
2 changes: 1 addition & 1 deletion lib/go/templates/transaction_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (
setupAccountFilename = "setup_account.cdc"
setupGenericVaultFilename = "metadata/setup_account_from_address.cdc"
mintTokensFilename = "mint_tokens.cdc"
createForwarderFilename = "create_forwarder.cdc"
createForwarderFilename = "tokenForwarder/create_forwarder.cdc"
burnTokensFilename = "burn_tokens.cdc"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fun testBurnTokens() {
access(all)
fun testVaultTypes() {
let scriptResult = executeScript(
"scripts/get_views.cdc",
"../transactions/metadata/scripts/get_views.cdc",
[recipient.address]
)
Test.expect(scriptResult, Test.beSucceeded())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ access(all) fun testRetrieveVaultDisplayInfo() {
let alice = Test.createAccount()

setupExampleToken(alice)
let result = scriptExecutor("test/example_token_vault_display_strict_equal.cdc", [alice.address])! as! Bool

Test.assertEqual(true, result)
let scriptResult = executeScript(
"scripts/example_token_vault_display_strict_equal.cdc",
[alice.address]
)
Test.expect(scriptResult, Test.beSucceeded())
}


Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/switchboard_tests.cdc → tests/switchboard_test.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fun testRemoveVaultTypeFromSwitchboard() {
access(all)
fun testUseSwitchboardWithForwarder() {
var txResult = executeTransaction(
"../transactions/create_forwarder.cdc",
"../transactions/tokenForwarder/create_forwarder.cdc",
[admin.address],
recipient
)
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit ff7e7cb

Please sign in to comment.