From c746ec86d343b33835fc6e0d248046f5b9d956ff Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Thu, 10 Feb 2022 12:50:31 +0000 Subject: [PATCH] changed 'set_minter_proxy' to 'setup_social_minter' --- tasks/burning_in_loop/main.go | 2 +- tasks/mint_1000_burn_100_tokens/main.go | 2 +- tasks/mint_2000_burn_1300_tokens/main.go | 2 +- tasks/mint_5000_burn_3500_tokens/main.go | 2 +- tasks/mint_burn_100_tokens/main.go | 2 +- tasks/mint_burn_instant/main.go | 2 +- tasks/mint_total_supply/main.go | 2 +- tasks/mint_with_collateral/main.go | 2 +- tasks/mint_with_fee_distribution/main.go | 2 +- tasks/minting_in_loop/main.go | 2 +- tasks/register_multiple_tokens/main.go | 46 +++++++++++++++++++ tasks/single_burn/main.go | 2 +- tasks/single_mint_burn/main.go | 2 +- .../main.go | 2 +- tasks/transfer_token_same_vaults/main.go | 2 +- tasks/user_story/main.go | 2 +- ...nter_proxy.cdc => setup_social_minter.cdc} | 0 17 files changed, 61 insertions(+), 15 deletions(-) rename transactions/{set_minter_proxy.cdc => setup_social_minter.cdc} (100%) diff --git a/tasks/burning_in_loop/main.go b/tasks/burning_in_loop/main.go index 780c8c4..792f143 100644 --- a/tasks/burning_in_loop/main.go +++ b/tasks/burning_in_loop/main.go @@ -34,7 +34,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/mint_1000_burn_100_tokens/main.go b/tasks/mint_1000_burn_100_tokens/main.go index 3ddb455..2ac7a98 100644 --- a/tasks/mint_1000_burn_100_tokens/main.go +++ b/tasks/mint_1000_burn_100_tokens/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/mint_2000_burn_1300_tokens/main.go b/tasks/mint_2000_burn_1300_tokens/main.go index 3012c13..ce95f84 100644 --- a/tasks/mint_2000_burn_1300_tokens/main.go +++ b/tasks/mint_2000_burn_1300_tokens/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/mint_5000_burn_3500_tokens/main.go b/tasks/mint_5000_burn_3500_tokens/main.go index 045690a..1d22b1a 100644 --- a/tasks/mint_5000_burn_3500_tokens/main.go +++ b/tasks/mint_5000_burn_3500_tokens/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/mint_burn_100_tokens/main.go b/tasks/mint_burn_100_tokens/main.go index 5c68d11..f4f5d5b 100644 --- a/tasks/mint_burn_100_tokens/main.go +++ b/tasks/mint_burn_100_tokens/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("100.00").AccountArgument("first").RunPrintEventsFull() diff --git a/tasks/mint_burn_instant/main.go b/tasks/mint_burn_instant/main.go index 3b8f0fe..1615db1 100644 --- a/tasks/mint_burn_instant/main.go +++ b/tasks/mint_burn_instant/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/mint_total_supply/main.go b/tasks/mint_total_supply/main.go index 96c4caf..155c63d 100644 --- a/tasks/mint_total_supply/main.go +++ b/tasks/mint_total_supply/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("10000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/mint_with_collateral/main.go b/tasks/mint_with_collateral/main.go index 5e459b8..575ef0f 100644 --- a/tasks/mint_with_collateral/main.go +++ b/tasks/mint_with_collateral/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("10000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/mint_with_fee_distribution/main.go b/tasks/mint_with_fee_distribution/main.go index 0bc12a4..49bac5d 100644 --- a/tasks/mint_with_fee_distribution/main.go +++ b/tasks/mint_with_fee_distribution/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/minting_in_loop/main.go b/tasks/minting_in_loop/main.go index 6596096..a173535 100644 --- a/tasks/minting_in_loop/main.go +++ b/tasks/minting_in_loop/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/register_multiple_tokens/main.go b/tasks/register_multiple_tokens/main.go index 0901941..35069a4 100644 --- a/tasks/register_multiple_tokens/main.go +++ b/tasks/register_multiple_tokens/main.go @@ -34,4 +34,50 @@ func main() { log.Printf(" ------ Social Token Details second Artist----- %s", TokenDetailsSecond) log.Printf(" ------ Social Token Details second Artist----- %s", TokenDetailsThird) + + log.Printf(" ------") + flow.TransactionFromFile("setup_fusd_vault").SignProposeAndPayAs("first").RunPrintEventsFull() + log.Printf(" ---") + + //First Account sets up FUSD Minter + flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() + + //Admin Account deposits minter into first account + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + + // First Account Mints and deposits in one transaction + flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("10000000.00").AccountArgument("second").RunPrintEventsFull() + + //Log balance + fusdFirstAccountBalance := flow.ScriptFromFile("get_fusd_balance").AccountArgument("first").RunFailOnError() + log.Printf("FUSD balance of account 'first account' %s", fusdFirstAccountBalance) + + //-------------------------------------------------// + //--------- Register Account -----------// + //-------------------------------------------------// + + //Register Token for a new account + flow.TransactionFromFile("register_token").SignProposeAndPayAs("account").StringArgument("TestSymbol").UFix64Argument("10000000.00").AccountArgument("first").RunPrintEventsFull() + + + //--------------------------------------------------// + //-- SETUP Admin and Add Capability of Controller --// + //--------------------------------------------------// + flow.TransactionFromFile("setup_admin_account").SignProposeAndPayAs("account").RunPrintEventsFull() + + flow.TransactionFromFile("add_admin_account").SignProposeAndPayAs("account").AccountArgument("account").RunPrintEventsFull() + + //--------------------------------------------------// + //--------- SETUP AND MINT SOCIAL TOKEN ------------// + //--------------------------------------------------// + + //Setup SocialToken Vaults for both accounts + flow.TransactionFromFile("setup_social_vault").SignProposeAndPayAs("second").StringArgument("TestSymbol_0x1cf0e2f2f715450").RunPrintEventsFull() + //flow.TransactionFromFile("social_token/setup_social_vault").SignProposeAndPayAs("account").RunPrintEventsFull() + + mintQuote := flow.ScriptFromFile("get_social_mint_quote").UFix64Argument("10000000.00").StringArgument("TestSymbol_0x1cf0e2f2f715450").RunFailOnError() + + + log.Printf(" ------ mintQuote is ----- %s", mintQuote) + } diff --git a/tasks/single_burn/main.go b/tasks/single_burn/main.go index add47d0..a943c2e 100644 --- a/tasks/single_burn/main.go +++ b/tasks/single_burn/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/single_mint_burn/main.go b/tasks/single_mint_burn/main.go index a864cef..9f7b9a1 100644 --- a/tasks/single_mint_burn/main.go +++ b/tasks/single_mint_burn/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/transfer_token_different_vaults_negative/main.go b/tasks/transfer_token_different_vaults_negative/main.go index 12f566f..e1e446d 100644 --- a/tasks/transfer_token_different_vaults_negative/main.go +++ b/tasks/transfer_token_different_vaults_negative/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("10000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/transfer_token_same_vaults/main.go b/tasks/transfer_token_same_vaults/main.go index 2b4445f..c560274 100644 --- a/tasks/transfer_token_same_vaults/main.go +++ b/tasks/transfer_token_same_vaults/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("10000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/tasks/user_story/main.go b/tasks/user_story/main.go index 3b8f0fe..1615db1 100644 --- a/tasks/user_story/main.go +++ b/tasks/user_story/main.go @@ -31,7 +31,7 @@ func main() { flow.TransactionFromFile("setup_fusd_minter").SignProposeAndPayAs("first").RunPrintEventsFull() //Admin Account deposits minter into first account - flow.TransactionFromFile("set_minter_proxy").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() + flow.TransactionFromFile("setup_social_minter").SignProposeAndPayAs("account").AccountArgument("first").RunPrintEventsFull() // First Account Mints and deposits in one transaction flow.TransactionFromFile("mint_fusd").SignProposeAndPayAs("first").UFix64Argument("2500000000.00").AccountArgument("second").RunPrintEventsFull() diff --git a/transactions/set_minter_proxy.cdc b/transactions/setup_social_minter.cdc similarity index 100% rename from transactions/set_minter_proxy.cdc rename to transactions/setup_social_minter.cdc