Skip to content

Commit

Permalink
Merge branch 'release/v1.9.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
onetechnical committed Jun 21, 2021
2 parents 3c87e12 + b6942a1 commit 513bc92
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.9.1
# Bugfix
- Allow asset URLs to be up to 96 bytes
# 1.9.0
# Added
- Support for TEAL 4 programs
Expand Down
6 changes: 3 additions & 3 deletions transaction/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func TestMakeAssetCreateTxn(t *testing.T) {
const clawback = addr
const unitName = "tst"
const assetName = "testcoin"
const testURL = "website"
const testURL = "websitewebsitewebsitewebsitewebsitewebsitewebsitewebsitewebsitewebsitewebsitewebsitewebsitewebsi" //96 characters
const metadataHash = "fACPO4nRgO55j1ndAK3W6Sgc4APkcyFh"
tx, err := MakeAssetCreateTxn(addr, 10, 322575, 323575, nil, "", genesisHash, total, 0, defaultFrozen, addr, reserve, freeze, clawback, unitName, assetName, testURL, metadataHash)
require.NoError(t, err)
Expand All @@ -167,7 +167,7 @@ func TestMakeAssetCreateTxn(t *testing.T) {
Type: types.AssetConfigTx,
Header: types.Header{
Sender: a,
Fee: 4020,
Fee: 4920,
FirstValid: 322575,
LastValid: 323575,
GenesisHash: byte32ArrayFromBase64(genesisHash),
Expand All @@ -192,7 +192,7 @@ func TestMakeAssetCreateTxn(t *testing.T) {
private, err := mnemonic.ToPrivateKey(addrSK)
require.NoError(t, err)
_, newStxBytes, err := crypto.SignTransaction(private, tx)
signedGolden := "gqNzaWfEQEDd1OMRoQI/rzNlU4iiF50XQXmup3k5czI9hEsNqHT7K4KsfmA/0DUVkbzOwtJdRsHS8trm3Arjpy9r7AXlbAujdHhuh6RhcGFyiaJhbcQgZkFDUE80blJnTzU1ajFuZEFLM1c2U2djNEFQa2N5RmiiYW6odGVzdGNva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FjZmc="
require.EqualValues(t, newStxBytes, byteFromBase64(signedGolden))
}

Expand Down
2 changes: 1 addition & 1 deletion types/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const AssetNameMaxLen = 32
const AssetUnitNameMaxLen = 8

// AssetURLMaxLen is the max length in bytes for the asset url
const AssetURLMaxLen = 32
const AssetURLMaxLen = 96

// AssetMetadataHashLen is the length of the AssetMetadataHash in bytes
const AssetMetadataHashLen = 32
Expand Down

0 comments on commit 513bc92

Please sign in to comment.