Skip to content

cardano-client-lib 0.1.5 ADA transfer successful, token transfer failed #6

@AdelaDella

Description

@AdelaDella

PaymentTransaction paymentTransaction =
PaymentTransaction.builder()
.sender(senderAccount)
.receiver(receiverAddress)
.amount(amount)
//.unit(CardanoConstants.LOVELACE)
.unit("d2175511c5793b09d27b7ddac0f64cc1b9900fe1dca1607ea949f143414458")
.build();

There is no problem transferring ADA main currency.
Transfer d2175511c5793b09d27b7ddac0f64cc1b9900fe1dca1607ea949f143414458 Token error reported

[PaymentTransaction(unit=d2175511c5793b09d27b7ddac0f64cc1b9900fe1dca1607ea949f143414458, amount=10000)]
22:37:33.090 [main] DEBUG com.bloxbean.cardano.client.backend.api.helper.TransactionHelperService - {
"body" : {
"inputs" : [ {
"transactionId" : "748326fa5b919c485ddbc93c94f0d9a000e4cbcd52d80dc44f71a38b551b2790",
"index" : 1
} ],
"outputs" : [ {
"address" : "addr1qx55fc4tgaeq20wgpm50a49e223cuvu2xl6zchtn8cqj5s69qe0w49serzs4j8xhxmma2c2mkcchcdcj0hkrf22p55ls6nmp33",
"value" : {
"coin" : 168090,
"multiAssets" : [ {
"policyId" : "d2175511c5793b09d27b7ddac0f64cc1b9900fe1dca1607ea949f143",
"assets" : [ {
"name" : "0x414458",
"value" : 10000
} ]
} ]
}
}, {
"address" : "addr1q9d03mv8ty0apfxl3w93avamqafgmgnkjn59nd2djjvngmv96j2mprflqpw20jknesga2q6hnhgz6gyaarafjat56e5qwmh2y2",
"value" : {
"coin" : 2413032,
"multiAssets" : [ {
"policyId" : "d2175511c5793b09d27b7ddac0f64cc1b9900fe1dca1607ea949f143",
"assets" : [ {
"name" : "0x414458",
"value" : 980000
} ]
} ]
}
} ],
"fee" : 170000,
"ttl" : 101149747,
"mint" : null,
"metadataHash" : null,
"validityStartInterval" : 0
},
"witnessSet" : null,
"metadata" : null
}
22:37:33.097 [main] DEBUG com.bloxbean.cardano.client.backend.api.helper.TransactionHelperService - Requests:
[PaymentTransaction(unit=d2175511c5793b09d27b7ddac0f64cc1b9900fe1dca1607ea949f143414458, amount=10000)]
22:37:46.997 [main] DEBUG com.bloxbean.cardano.client.backend.api.helper.TransactionHelperService - {
"body" : {
"inputs" : [ {
"transactionId" : "748326fa5b919c485ddbc93c94f0d9a000e4cbcd52d80dc44f71a38b551b2790",
"index" : 1
} ],
"outputs" : [ {
"address" : "addr1qx55fc4tgaeq20wgpm50a49e223cuvu2xl6zchtn8cqj5s69qe0w49serzs4j8xhxmma2c2mkcchcdcj0hkrf22p55ls6nmp33",
"value" : {
"coin" : 168090,
"multiAssets" : [ {
"policyId" : "d2175511c5793b09d27b7ddac0f64cc1b9900fe1dca1607ea949f143",
"assets" : [ {
"name" : "0x414458",
"value" : 10000
} ]
} ]
}
}, {
"address" : "addr1q9d03mv8ty0apfxl3w93avamqafgmgnkjn59nd2djjvngmv96j2mprflqpw20jknesga2q6hnhgz6gyaarafjat56e5qwmh2y2",
"value" : {
"coin" : 2411327,
"multiAssets" : [ {
"policyId" : "d2175511c5793b09d27b7ddac0f64cc1b9900fe1dca1607ea949f143",
"assets" : [ {
"name" : "0x414458",
"value" : 980000
} ]
} ]
}
} ],
"fee" : 171705,
"ttl" : 101149747,
"mint" : null,
"metadataHash" : null,
"validityStartInterval" : 0
},
"witnessSet" : null,
"metadata" : null
}
22:37:48.185 [main] ERROR com.bloxbean.cardano.client.backend.api.helper.TransactionHelperService - Trasaction submission failed
Transaction Failed: Result{successful=false, response='{"error":"Bad Request","message":""transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (BabbageOutputTooSmallUTxO [((Addr Mainnet (KeyHashObj (KeyHash "a944e2ab4772053dc80ee8fed4b952a38e338a37f42c5d733e012a43")) (StakeRefBase (KeyHashObj (KeyHash "45065eea961918a1591cd736f7d5615bb6317c37127dec34a941a53f"))),Value 168090 (fromList [(PolicyID {policyID = ScriptHash "d2175511c5793b09d27b7ddac0f64cc1b9900fe1dca1607ea949f143"},fromList [(414458,10000)])]),NoDatum,SNothing),Coin 1142150)]))])"","status_code":400}', code=400, value=TransactionResult(signedTxn=[], transactionId=null)}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions