4

Stellar Bridge doesn't receive transactions with non native assets. These payments have status "Asset not allowed" in bridge DB, and the bridge doesn't make a callback.

At the same time these transactions present in a blockchain.

What I'm doing wrong?

# Bridge server bridge.cfg example

port = 8006
horizon = "https://horizon-testnet.stellar.org"
network_passphrase = "Test SDF Network ; September 2015"
api_key = ""
mac_key = ""

[[assets]]
code="USD"
issuer="GC4RK7WXSOAODFZQRM6FFTXDPYVJDOY3NYZBX6HSTLZ4VI5EQEXF2HAX"

[[assets]]
code="EUR"
issuer="GC4RK7WXSOAODFZQRM6FFTXDPYVJDOY3NYZBX6HSTLZ4VI5EQEXF2HAX"

#Listen for XLM Payments
[[assets]]
code="XLM"

[database]
type = "mysql"
url = "bridge:bridge@/stellar_bridge?parseTime=true"

[accounts]
# A secret seed that can authorize trustlines for assets you issue. For more,
# see https://stellar.org/developers/guides/concepts/assets.html#controlling-asset-holders
authorizing_seed = "SDMRITVCFY6IIK6H5DXIVUOL342YFVE3VFOGVF3D7XXHGITPX4ABMYXR"
# The secret seed for your base account, from which payments are made base_seed = (some seed)
# The ID of the account that issues your assets
issuing_account_id = "GCOGCYU77DLEVYCXDQM7F32M5PCKES6VU3Z5GURF6U6OA5LFOVTRYPOX"
# The account ID that receives payments on behalf of your customers. In this
# case, it is the account ID that matches `base_seed` above.
receiving_account_id = "GC4RK7WXSOAODFZQRM6FFTXDPYVJDOY3NYZBX6HSTLZ4VI5EQEXF2HAX"

[callbacks]
receive = "http://localhost:8002/receive"
error = "http://localhost:8002/error"
2

I don't exactly is that is the problem but you should look at your configuration file. In there, I see:

  1. Your are trusting EUR and USD assets issued by account GC4RK7WX...F2HAX
  2. You are issuing with assets with account GCOGCY...TRYPOX
  3. You will be receiving payments with account GC4RK7WX...EQEXF2HAX

Based on the above I see the following potential problems:

  1. You are having the receiving_account_id (GC4RK7WX...EQEXF2HAX) as the issuer of your assets. Normally, the issuer of your assets is the account that you have in the issuing_account_id field or any other issuer. But not the account you use as receiving_account_id. Following this, your [assets] field in the configuration file will look like this:
[[assets]]
code="USD"
issuer="GCOGCYU77DLEVYCXDQM7F32M5PCKES6VU3Z5GURF6U6OA5LFOVTRYPOX"

[[assets]]
code="EUR"
issuer="GCOGCYU77DLEVYCXDQM7F32M5PCKES6VU3Z5GURF6U6OA5LFOVTRYPOX"

[[assets]]
code="XLM" 
  1. Your receiving_account_id is trusting assets issued by another account. Look [here][1] and see how in the balances array, your receiving_account_id has balances assets UAH and USD from account GA7VZ..4VIUIFWKQMATJTJHDY. I don't see neither UAH as asset nor account GA7VZ..4VIUIFWKQMATJTJHDY as issuer in your configuration file.

Summing up:

  1. Make sure that your receiving_account_id is trusting the assets from the right issuer

  2. It is best practice to have and issuing account and a base (receiving) account. One of the reasons, apart from better security, is that assets get automatically destroyed once they are sent out to the account that issued them. So, if you don't want this to happen you should let people send the issued assets to the base account that you should also control

  • Thanks a lot for your answer! It has resolved the problem! – Viktor Goncharov May 25 '18 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.