From f9406edc16ba2b89efed469b3b5362fd7648c4a8 Mon Sep 17 00:00:00 2001 From: Joshua Hannan Date: Thu, 3 Sep 2020 13:46:22 -0400 Subject: [PATCH] updating dependencies and mint tokens script (#38) --- lib/go/templates/internal/assets/assets.go | 6 ++-- lib/go/test/go.mod | 6 ++-- lib/go/test/go.sum | 38 ++++++++++++++++++++ lib/go/test/test.go | 3 +- lib/go/test/token_test.go | 40 ---------------------- transactions/mint_tokens.cdc | 2 +- 6 files changed, 47 insertions(+), 48 deletions(-) diff --git a/lib/go/templates/internal/assets/assets.go b/lib/go/templates/internal/assets/assets.go index 5b5dd0ed..1c63b183 100644 --- a/lib/go/templates/internal/assets/assets.go +++ b/lib/go/templates/internal/assets/assets.go @@ -2,7 +2,7 @@ // sources: // ../../../transactions/burn_tokens.cdc (1.102kB) // ../../../transactions/create_forwarder.cdc (1.8kB) -// ../../../transactions/mint_tokens.cdc (889B) +// ../../../transactions/mint_tokens.cdc (890B) // ../../../transactions/scripts/get_balance.cdc (460B) // ../../../transactions/scripts/get_supply.cdc (229B) // ../../../transactions/setup_account.cdc (1.186kB) @@ -116,7 +116,7 @@ func TransactionsCreate_forwarderCdc() (*asset, error) { return a, nil } -var _TransactionsMint_tokensCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x52\x5d\x6b\xdb\x40\x10\x7c\xd7\xaf\xd8\xfa\x21\x48\xd0\xc8\x2e\x94\x3e\x18\x27\x41\x6d\xec\x52\xda\xba\x10\xc7\x7d\x3f\x9d\xd6\xca\x52\xe9\xee\xd8\x5b\xd5\x0e\x21\xff\xbd\x9c\x3e\x62\x39\x49\xa3\x97\x83\xd3\xcc\xec\xcc\xce\x51\xed\x2c\x0b\xac\x1a\x53\x52\x5e\xe1\xad\xfd\x83\x06\x76\x6c\x6b\x98\x1d\x56\xdb\xf5\xd7\x6f\x9f\x7f\x2c\x6f\x7f\x7d\x5f\xae\xb3\xeb\xeb\x9b\xe5\x66\x13\xf5\x84\xe5\x41\xd5\xee\x19\xfe\x04\x17\x09\x2b\xe3\x95\x16\xb2\x26\x66\xd4\xe4\x08\x8d\xcc\x21\x2b\x0a\x46\xef\xdf\x83\xaa\x6d\x13\x2e\xb6\x2b\x3a\x7c\xfa\x98\xc0\x43\x04\x00\x50\xa1\x80\x04\xd1\xac\xa8\xc9\xcc\xe1\x6c\x3c\x28\x6d\x2f\xc9\x0b\x2b\xb1\x7c\x8a\xbf\x41\x8d\xf4\x17\x79\x0e\x67\x0f\x27\x69\xd2\xe1\xcf\x63\xd4\x32\x1c\xa3\x53\x8c\xb1\xa7\xd2\x04\x78\xd6\xc8\x5d\xa6\x75\x30\x33\x98\x08\x9f\xc7\x6a\x97\x1e\x9d\xc0\x05\x74\x84\x27\x40\x9a\x5b\x66\xbb\x5f\xbc\xe1\xf0\x32\x0e\x9b\x99\xc3\xd4\x8b\x65\x55\xe2\x14\x47\xd0\x16\x99\xc0\x93\xde\xd5\x15\x38\x65\x48\xc7\x93\x4d\x3b\x08\xc8\x83\xb1\x02\x72\x87\x5d\x42\x50\x81\x31\x49\xa2\x57\x3c\x0e\x19\xe1\x02\x4a\x94\x3e\xce\x71\xed\xc9\xd1\x75\x89\xf2\x45\x39\x95\x53\x45\x72\x1f\x4f\x5d\x93\x57\xa4\x4f\x8c\x0d\x5a\xc9\xbb\x97\x59\xff\xb7\xda\xcb\x38\x79\x25\xc8\xd6\xa8\xbc\x0a\xee\xa1\xe3\x03\x0f\x36\x19\x77\xc8\x68\x34\x4e\x3a\x5e\xdf\x0d\x1e\x50\x37\x82\xa3\x1a\x42\xbf\x35\x19\x41\x86\xc5\xf9\xf3\x52\x52\xcd\xa8\x04\xd7\xb8\xff\xd9\x42\x62\x55\x55\x76\x8f\x45\xd6\x3f\xad\x0f\xb3\x59\x3a\x4b\x5e\x6a\x15\xbf\x55\x53\x49\x10\xec\xa4\xd3\x70\xb4\x89\x7c\x3c\x3c\xcb\xee\x7c\x73\xd9\x69\x81\xce\x7a\x92\xbe\xe5\xc5\xf9\x48\x7c\x44\x2c\xd0\x0b\xdb\xfb\x7e\x56\x1f\xf7\xf1\x5f\x00\x00\x00\xff\xff\xe9\xbf\xfc\xd0\x79\x03\x00\x00" +var _TransactionsMint_tokensCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x52\xcb\x6e\xdb\x30\x10\xbc\xeb\x2b\xb6\x3e\x04\x12\xd0\xc8\x3d\x14\x3d\x18\x4e\x02\xb5\xb1\x8b\xa2\xad\x0b\xc4\x71\xef\x14\xb5\x56\x16\x95\x48\x62\xb9\xaa\x1d\x04\xf9\xf7\x82\x7a\xc4\xb2\x93\x5a\x17\x01\xe4\xcc\xec\xcc\x0e\xa9\x76\x96\x05\x96\x8d\x29\x29\xaf\xf0\xde\xfe\x41\x03\x5b\xb6\x35\x7c\xd8\x2f\x37\xab\xaf\xdf\x3e\xff\x58\xdc\xff\xfa\xbe\x58\x65\xb7\xb7\x77\x8b\xf5\x3a\xea\x09\x8b\xbd\xaa\xdd\x09\xfe\x08\x17\x09\x2b\xe3\x95\x16\xb2\x26\x66\xd4\xe4\x08\x8d\xcc\x20\x2b\x0a\x46\xef\xdf\x83\xaa\x6d\x13\x0e\x36\x4b\xda\x7f\xfa\x98\xc0\x53\x04\x00\x50\xa1\x80\x04\xd1\xac\xa8\xc9\xcc\xe0\x62\x3c\x28\x6d\x0f\xc9\x0b\x2b\xb1\x7c\x8c\xbf\x43\x8d\xf4\x17\x79\x06\x17\x4f\x47\x69\xd2\xe1\xe6\x39\x6a\x19\x8e\xd1\x29\xc6\xd8\x53\x69\x02\x3c\x6b\xe4\x21\xd3\x3a\x98\x19\x4c\x84\xcf\x63\xb5\x4d\x0f\x4e\xe0\x0a\x3a\xc2\x0b\x20\xcd\x2d\xb3\xdd\xcd\xcf\x38\xbc\x8e\xc3\x66\x66\x30\xf5\x62\x59\x95\x38\xc5\x11\xb4\x45\x26\xf0\xa2\x77\x73\x03\x4e\x19\xd2\xf1\x64\xdd\x0e\x02\xf2\x60\xac\x80\x3c\x60\x97\x10\x54\x60\x4c\x92\xe8\x0d\x8f\x43\x46\xb8\x82\x12\xa5\x8f\x73\x58\x7b\x72\x70\x5d\xa2\x7c\x51\x4e\xe5\x54\x91\x3c\xc6\x53\xd7\xe4\x15\xe9\x23\x63\x83\x56\xf2\xee\x75\xd6\xff\xad\xf6\x3a\x4e\xde\x08\xb2\x31\x2a\xaf\x82\x7b\xe8\xf8\xc0\x83\x4d\xc6\x2d\x32\x1a\x8d\x93\x8e\xd7\x77\x83\x7b\xd4\x8d\xe0\xa8\x86\xd0\x6f\x4d\x46\x90\x61\x7e\x79\x5a\x4a\xaa\x19\x95\xe0\x0a\x77\x3f\x5b\x48\xac\xaa\xca\xee\xb0\xc8\xfa\xa7\xd5\x3d\xb1\xe4\xb5\x58\xf1\x5b\x35\x95\x04\xc5\x4e\x3b\x0d\xbf\x36\x92\x8f\xd5\x09\xf9\xcc\xb6\xd3\x02\x9d\xf5\x24\x7d\xcd\xf3\xcb\x91\xf8\x88\x58\xa0\x17\xb6\x8f\xfd\xac\x3e\xef\xf3\xbf\x00\x00\x00\xff\xff\xdf\xdc\xa4\x3a\x7a\x03\x00\x00" func TransactionsMint_tokensCdcBytes() ([]byte, error) { return bindataRead( @@ -132,7 +132,7 @@ func TransactionsMint_tokensCdc() (*asset, error) { } info := bindataFileInfo{name: "../../../transactions/mint_tokens.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf3, 0x6e, 0xad, 0x72, 0x7a, 0x71, 0x6c, 0x8a, 0x8c, 0x94, 0x67, 0x9f, 0x54, 0x62, 0x1b, 0x8d, 0x99, 0xf2, 0x55, 0x64, 0xea, 0x57, 0x5e, 0xef, 0x8a, 0xe6, 0xb, 0xf, 0xeb, 0x3b, 0x18, 0xd0}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xaf, 0x1a, 0xe0, 0xd7, 0xca, 0xe1, 0x4b, 0x48, 0x6, 0x7a, 0x51, 0xb4, 0xb8, 0xbc, 0xdf, 0x82, 0xd5, 0x93, 0x2d, 0xa5, 0xa7, 0x58, 0xe5, 0x10, 0xf4, 0xea, 0x3b, 0xbc, 0xac, 0xe4, 0xb4, 0x70}} return a, nil } diff --git a/lib/go/test/go.mod b/lib/go/test/go.mod index 87ef6563..91a130cc 100644 --- a/lib/go/test/go.mod +++ b/lib/go/test/go.mod @@ -3,13 +3,13 @@ module github.com/onflow/flow-ft/lib/go/test go 1.13 require ( - github.com/dapperlabs/flow-emulator v0.6.0 - github.com/onflow/cadence v0.6.0 + github.com/dapperlabs/flow-emulator v0.10.0 + github.com/onflow/cadence v0.8.2 github.com/onflow/flow v0.1.4-0.20200601215056-34a11def1d6b // indirect github.com/onflow/flow-ft/contracts v0.1.3 github.com/onflow/flow-ft/lib/go/contracts v0.1.3 github.com/onflow/flow-ft/lib/go/templates v0.0.0-00010101000000-000000000000 - github.com/onflow/flow-go-sdk v0.8.0 + github.com/onflow/flow-go-sdk v0.9.0 github.com/stretchr/testify v1.6.1 github.com/vektra/mockery v1.1.2 // indirect github.com/zenazn/goji v0.9.0 // indirect diff --git a/lib/go/test/go.sum b/lib/go/test/go.sum index 3dc32aaa..ac24308c 100644 --- a/lib/go/test/go.sum +++ b/lib/go/test/go.sum @@ -68,6 +68,7 @@ github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1: github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -124,17 +125,23 @@ github.com/dapperlabs/flow-emulator v0.5.0 h1:+H64/FRdpO2JmRnfsmOP5xJLiFJAIdVZ+N github.com/dapperlabs/flow-emulator v0.5.0/go.mod h1:fJ8y1QgoQOYSLEcgnVawl//w9e7CgVU36lf23NR6Wz0= github.com/dapperlabs/flow-emulator v0.6.0 h1:g6qvWEW5/vh6zYggssLDjwUfRT4bRUrns5lMtN4FPPc= github.com/dapperlabs/flow-emulator v0.6.0/go.mod h1:PLbVo3URoDbf4alUjlnkVYODP4BaQGKMxU5DdUA5f4Y= +github.com/dapperlabs/flow-emulator v0.10.0 h1:Fz5TvP+5NGJRLKWrR2qKyYZb7x6TEBRD0Sp81CBoj7E= +github.com/dapperlabs/flow-emulator v0.10.0/go.mod h1:aiK7arQQxKZeTIWVMNzQDe8lDuPxpSyAlPWkXZt2+jg= github.com/dapperlabs/flow-go v0.4.1-0.20200602235543-7c086e054cc3 h1:+UKAlUn9FfYp/MFV6ff5EcQAk68DuIusbVPMfOTTto8= github.com/dapperlabs/flow-go v0.4.1-0.20200602235543-7c086e054cc3/go.mod h1:/BdLWfMxQzG/RX+OhdkgmolAMkVnT2tO92VVevlSS6U= github.com/dapperlabs/flow-go v0.4.1-0.20200708192840-30b3e2d5a586 h1:5Y74h4h7WZBBMXkcwaRfbZ1Z8E6BTTg5jtWZ14Zm+As= github.com/dapperlabs/flow-go v0.4.1-0.20200708192840-30b3e2d5a586/go.mod h1:wbdHRg3G7UvnntGYvxGiTN18WqSCOy7eUyBQhfx8GRw= github.com/dapperlabs/flow-go v0.4.1-0.20200714185320-c0c6380ee9fc h1:3lhQLxSRbfmuwHZGgN3oEfwTEsrDEHQ0O3gUE86+/JQ= github.com/dapperlabs/flow-go v0.4.1-0.20200714185320-c0c6380ee9fc/go.mod h1:sz0/UgtP8lHKEJroCcmxC1D0OPsTwx922yUh753k6hE= +github.com/dapperlabs/flow-go v0.4.1-0.20200811032128-2be0a8775d65 h1:BZ0c2Rr5drbj8gn3Q/xD4g1gOfPNvXE923wk3M2JrDQ= +github.com/dapperlabs/flow-go v0.4.1-0.20200811032128-2be0a8775d65/go.mod h1:RkOKKUpKzYbh+pogCYptFFd1s71hP5E+zu8SGmYZmy0= github.com/dapperlabs/flow-go/crypto v0.3.2-0.20200312195452-df4550a863b7/go.mod h1:6UyHoekg86OJnzTz9hp3Ubzp2ZkrDMFg2krGbVEiloU= github.com/dapperlabs/flow-go/crypto v0.3.2-0.20200602194037-af8844481849 h1:2KFSBau3NqjwKA5kJ8uzlV0Ma0B0NAnW3tlAoeBtTNI= github.com/dapperlabs/flow-go/crypto v0.3.2-0.20200602194037-af8844481849/go.mod h1:9RLfdwwRI3FVD/tm4Y8E9aqViRnCiXTcGgcmB8CsEVQ= github.com/dapperlabs/flow-go/crypto v0.3.2-0.20200708192840-30b3e2d5a586 h1:tbAOy9zTLDb2BhJ7YUBTPaU602A1hKyQhirNb0dy17k= github.com/dapperlabs/flow-go/crypto v0.3.2-0.20200708192840-30b3e2d5a586/go.mod h1:9RLfdwwRI3FVD/tm4Y8E9aqViRnCiXTcGgcmB8CsEVQ= +github.com/dapperlabs/flow-go/crypto v0.3.2-0.20200811032128-2be0a8775d65 h1:We0XRcoF8MiIjuvtjWj+nOCnpAlEBITI/ucCBED7SO4= +github.com/dapperlabs/flow-go/crypto v0.3.2-0.20200811032128-2be0a8775d65/go.mod h1:9RLfdwwRI3FVD/tm4Y8E9aqViRnCiXTcGgcmB8CsEVQ= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -297,6 +304,7 @@ github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUP github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M= github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= +github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= github.com/ipfs/go-datastore v0.1.0/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= @@ -323,6 +331,7 @@ github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kP github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= +github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= @@ -386,18 +395,22 @@ github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xS github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= +github.com/libp2p/go-libp2p v0.10.3/go.mod h1:0ER6iPSaPeQjryNgOnm9bLNpMJCYmuw54xJXsVR17eE= github.com/libp2p/go-libp2p-autonat v0.1.1/go.mod h1:OXqkeGOY2xJVWKAGV2inNF5aKN/djNA3fdpCWloIudE= github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQdNbfzE1C718tcViI= github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= +github.com/libp2p/go-libp2p-autonat v0.3.2/go.mod h1:0OzOi1/cVc7UcxfOddemYD5vzEqi4fwRbnZcJGLi68U= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= +github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU= github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= +github.com/libp2p/go-libp2p-circuit v0.3.1/go.mod h1:8RMIlivu1+RxhebipJwFDA45DasLx+kkrp4IlJj53F4= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.4/go.mod h1:jyuCQP356gzfCFtRKyvAbNkyeuxb7OlyhWZ3nls5d2I= @@ -416,15 +429,18 @@ github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqe github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= +github.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= github.com/libp2p/go-libp2p-discovery v0.4.0/go.mod h1:bZ0aJSrFc/eX2llP0ryhb1kpgkPyTo23SJ5b7UQCMh4= +github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3g+OtR+EMMODbKo= github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= +github.com/libp2p/go-libp2p-mplex v0.2.4/go.mod h1:mI7iOezdWFOisvUwaYd3IDrJ4oVmgoXK8H331ui39CE= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= @@ -441,6 +457,7 @@ github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuD github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-pubsub v0.2.7-0.20200226020716-1f147c24576a/go.mod h1:R4R0kH/6p2vu8O9xsue0HNSjEuXMEPBgg4h3nVDI15o= github.com/libp2p/go-libp2p-pubsub v0.3.2/go.mod h1:Uss7/Cfz872KggNb+doCVPHeCDmXB7z500m/R8DaAUk= +github.com/libp2p/go-libp2p-pubsub v0.3.3/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= github.com/libp2p/go-libp2p-secio v0.2.0/go.mod h1:2JdZepB8J5V9mBp79BmwsaPQhRPNN2NrnB2lKQcdy6g= @@ -451,6 +468,7 @@ github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaT github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= github.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA= +github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= @@ -474,13 +492,16 @@ github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3 github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= +github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= +github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= @@ -538,6 +559,7 @@ github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyex github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= @@ -554,6 +576,7 @@ github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVq github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= @@ -584,11 +607,14 @@ github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcM github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= +github.com/multiformats/go-multistream v0.1.2/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= @@ -614,6 +640,10 @@ github.com/onflow/cadence v0.5.1 h1:Nk8MIuMuDq5SKNeQRvxjmjXtKvJCaNd/0XgiyH8oOaE= github.com/onflow/cadence v0.5.1/go.mod h1:VCZ/aqMjf84JQDkCOGqGRQslVwFjx/7PJrH/zpAh/Qo= github.com/onflow/cadence v0.6.0 h1:V4u390VPCYQanTK3GYGRjauoyOpMFRmX4EF6Pc6E/Fo= github.com/onflow/cadence v0.6.0/go.mod h1:VCZ/aqMjf84JQDkCOGqGRQslVwFjx/7PJrH/zpAh/Qo= +github.com/onflow/cadence v0.8.0/go.mod h1:R43uGnqQsTcnFf1fMPCcMjDPplBIzbR5XkFZRF2OH3Y= +github.com/onflow/cadence v0.8.2 h1:+7Xe92wme8KjwVcnH9OjDwJecz1P96RbJx2cbrzwFdw= +github.com/onflow/cadence v0.8.2/go.mod h1:R43uGnqQsTcnFf1fMPCcMjDPplBIzbR5XkFZRF2OH3Y= +github.com/onflow/flow v0.1.4-0.20200601215056-34a11def1d6b h1:wG1lmGfSIJW4L0ObdHNWHdk2LLXUoHrOU68krvtB//0= github.com/onflow/flow v0.1.4-0.20200601215056-34a11def1d6b/go.mod h1:lzyAYmbu1HfkZ9cfnL5/sjrrsnJiUU8fRL26CqLP7+c= github.com/onflow/flow-ft v0.1.2 h1:DlnffFsNNSuK6bTwmQwIeutFKds0XIf8JYQ1TDd6bc8= github.com/onflow/flow-ft/contracts v0.0.0-20200525235630-0e8024a483ce h1:I8SaLOFlQN7Jr+aU1mZB0mnsq2qlaaJPeji4PmkTWfA= @@ -635,11 +665,15 @@ github.com/onflow/flow-go-sdk v0.7.0/go.mod h1:wBDgn2OhH6y7BSgQBkXB6HBNMXr8LZKXv github.com/onflow/flow-go-sdk v0.7.1/go.mod h1:SxkCIZA2dlHzpzxkn21Qie59XFoCCs5g1GHvaCup7do= github.com/onflow/flow-go-sdk v0.8.0 h1:jJZaf07R41dk6UqsZW6IQ024jIYocFtma8peTS0u50I= github.com/onflow/flow-go-sdk v0.8.0/go.mod h1:9I3N0v59yuOQqlGej5AgZ20Q9UbMaJWrGqM9B0HUVrE= +github.com/onflow/flow-go-sdk v0.9.0 h1:eK40f6RU+cjh9ASGOPzsE38gO8VQhy3x52rnUGEWY6k= +github.com/onflow/flow-go-sdk v0.9.0/go.mod h1:FVVYKmWmUjfa1A4eIeZfBC+vFg0VmCf1TUaBowx+3AM= github.com/onflow/flow/protobuf/go/flow v0.1.4 h1:xRdLYCxR/V6lq03ElK3g0T/F8pCIpLrKs2IHQTYr9rM= github.com/onflow/flow/protobuf/go/flow v0.1.4/go.mod h1:kRugbzZjwQqvevJhrnnCFMJZNmoSJmxlKt6hTGXZojM= github.com/onflow/flow/protobuf/go/flow v0.1.5-0.20200601215056-34a11def1d6b/go.mod h1:kRugbzZjwQqvevJhrnnCFMJZNmoSJmxlKt6hTGXZojM= github.com/onflow/flow/protobuf/go/flow v0.1.5-0.20200611205353-548107cc9aca/go.mod h1:kRugbzZjwQqvevJhrnnCFMJZNmoSJmxlKt6hTGXZojM= github.com/onflow/flow/protobuf/go/flow v0.1.5-0.20200619174948-a3a856d16a27/go.mod h1:kRugbzZjwQqvevJhrnnCFMJZNmoSJmxlKt6hTGXZojM= +github.com/onflow/flow/protobuf/go/flow v0.1.5-0.20200806013300-5011e9d6a292 h1:ovshv2BcIbwU35bPffGXBVmQMClxR3dlj0BsXHQZDSk= +github.com/onflow/flow/protobuf/go/flow v0.1.5-0.20200806013300-5011e9d6a292/go.mod h1:kRugbzZjwQqvevJhrnnCFMJZNmoSJmxlKt6hTGXZojM= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -656,6 +690,8 @@ github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -824,6 +860,7 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.1 h1:rsqfU5vBkVknbhUGbAUwQKR2H4ItV8tjJ+6kJX4cxHM= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -947,6 +984,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/lib/go/test/test.go b/lib/go/test/test.go index ae2d4397..7f1c6952 100644 --- a/lib/go/test/test.go +++ b/lib/go/test/test.go @@ -2,6 +2,7 @@ package test import ( "io/ioutil" + "os" "testing" "github.com/onflow/flow-go-sdk/crypto" @@ -76,7 +77,7 @@ func Submit( } else { if !assert.True(t, result.Succeeded()) { t.Log(result.Error.Error()) - cmd.PrettyPrintError(result.Error, "", map[string]string{"": ""}) + cmd.PrettyPrintError(os.Stdout, result.Error, "", map[string]string{"": ""}) } } diff --git a/lib/go/test/token_test.go b/lib/go/test/token_test.go index 9b442bfa..2208ec2f 100644 --- a/lib/go/test/token_test.go +++ b/lib/go/test/token_test.go @@ -462,46 +462,6 @@ func TestMintingAndBurning(t *testing.T) { assert.Equal(t, supply.(cadence.UFix64), CadenceUFix64("1000.0")) }) - t.Run("Shouldn't be able to mint more than the allowed amount", func(t *testing.T) { - tx := flow.NewTransaction(). - SetScript(templates.GenerateMintTokensScript(fungibleAddr, exampleTokenAddr, "ExampleToken")). - SetGasLimit(100). - SetProposalKey(b.ServiceKey().Address, b.ServiceKey().ID, b.ServiceKey().SequenceNumber). - SetPayer(b.ServiceKey().Address). - AddAuthorizer(exampleTokenAddr) - - _ = tx.AddArgument(cadence.NewAddress(joshAddress)) - _ = tx.AddArgument(CadenceUFix64("101.0")) - - signAndSubmit( - t, b, tx, - []flow.Address{b.ServiceKey().Address, exampleTokenAddr}, - []crypto.Signer{b.ServiceKey().Signer(), exampleTokenSigner}, - true, - ) - - // Assert that the vaults' balances are correct - result, err := b.ExecuteScript(templates.GenerateInspectVaultScript(fungibleAddr, exampleTokenAddr, "ExampleToken"), [][]byte{jsoncdc.MustEncode(cadence.Address(exampleTokenAddr))}) - require.NoError(t, err) - if !assert.True(t, result.Succeeded()) { - t.Log(result.Error.Error()) - } - balance := result.Value - assert.Equal(t, balance.(cadence.UFix64), CadenceUFix64("1000.0")) - - // Assert that the vaults' balances are correct - result, err = b.ExecuteScript(templates.GenerateInspectVaultScript(fungibleAddr, exampleTokenAddr, "ExampleToken"), [][]byte{jsoncdc.MustEncode(cadence.Address(joshAddress))}) - require.NoError(t, err) - if !assert.True(t, result.Succeeded()) { - t.Log(result.Error.Error()) - } - balance = result.Value - assert.Equal(t, balance.(cadence.UFix64), CadenceUFix64("0.0")) - - supply := executeScriptAndCheck(t, b, templates.GenerateInspectSupplyScript(fungibleAddr, exampleTokenAddr, "ExampleToken")) - assert.Equal(t, supply.(cadence.UFix64), CadenceUFix64("1000.0")) - }) - t.Run("Should mint tokens, deposit, and update balance and total supply", func(t *testing.T) { tx := flow.NewTransaction(). SetScript(templates.GenerateMintTokensScript(fungibleAddr, exampleTokenAddr, "ExampleToken")). diff --git a/transactions/mint_tokens.cdc b/transactions/mint_tokens.cdc index ceafa6b2..eb732658 100644 --- a/transactions/mint_tokens.cdc +++ b/transactions/mint_tokens.cdc @@ -17,7 +17,7 @@ transaction(recipient: Address, amount: UFix64) { } execute { - let minter <- self.tokenAdmin.createNewMinter(allowedAmount: 100.0) + let minter <- self.tokenAdmin.createNewMinter(allowedAmount: amount) let mintedVault <- minter.mintTokens(amount: amount) self.tokenReceiver.deposit(from: <-mintedVault)