You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@robert-mcgee
Am surprised that the Algorand network returns that error message but it turns out that the problem is with the length of the bytes of the string you are trying to use as the metadata, for example, if you used .metadataHashB64(metadataHash: "Sample metadata ".data(using: .utf8)!.base64EncodedString() you will get a successful response, i will create a PR to validate this from the SDK but that will only return the right error message, a fix you can make for this on your end might be for you to pad your string until they are 32 bytes before passing them to the sdk
When submitting an asset creation transaction with base64 encoded metadata the network returns a 400 Bad Request response with the following message:
{ "message": "At least one signature didn't pass verification" }
Code snippet
let tx = try! Transaction.assetCreateTransactionBuilder() .setSender(creator_address) .setAssetTotal(assetTotal: Int64(units)) .setAssetDecimals(assetDecimals: Int64(decimals)) .assetUnitName(assetUnitName: unitName) .assetName(assetName: name) .url(url: String("ipfs://\(metadataCID)#arc3")) .manager(manager: creator_address.description) .reserve(reserve: creator_address.description) .metadataHashB64(metadataHash: ("Sample metadata".data(using: .utf8)?.base64EncodedString())!) .defaultFrozen(defaultFrozen: false) .noteB64(note: ("Minted with Quick Mint for macOS".data(using: .utf8)?.base64EncodedString())!) .suggestedParams(params: paramResponse.data!) .build()
Transaction is sent successfully if I remove the metadata.
The text was updated successfully, but these errors were encountered: