tokenblockchaincorda

Error while redeeming fungible token in corda


I am trying a scenario where

  1. Party A issues a token to Party B
  2. Party B will move that token to Party C
  3. Party C move that token again to Party A
  4. Party A try to redeem it

I am facing issues while redeeming the token using RedeemFungibleTokens

Error : java.lang.NoClassDefFoundError: com/r3/corda/lib/ci/workflows/SyncKeyMappingFlow

I've written the code as

  @Suspendable
    override fun call():String {
        val stateAndRef = serviceHub.vaultService.queryBy<FungibleToken>()
                .states.filter {it.state.data.holder.equals(ourIdentity) }.first()

        val amount:Amount<TokenType> = Amount(amount,stateAndRef.state.data.tokenType)

        val stx = subFlow(RedeemFungibleTokens(amount,ourIdentity, emptyList(),null))


        return "Redeemed $amount  token(s) by ${ourIdentity.name.organisation}"+
                "\ntxId: ${stx.id}"
    }

Solution

  • Perhaps you are missing the confidential identity dependency in your project. Try adding it to your project.

    cordapp "$confidential_id_release_group:ci-workflows:$confidential_id_release_version".
    

    Also make sure its deployed to the node.