0

我在尝试创建帐户时收到 Faraday::ClientError(服务器以状态 400 响应)。这些是我正在执行的以下步骤,每个查询的响应为 200。

keypair = Stellar::KeyPair.random
account = Stellar::Account.from_address(keypair.address)
funder = Stellar::Account.from_seed('')
client = Stellar::Client.default
client.create_account(account: account, funder: funder, starting_balance: 2)

我已经从 gem 中调试了代码,并且在参数方面工作正常

def create_account(options = {})
funder = options[:funder]
sequence = options[:sequence] || (account_info(funder).sequence.to_i + 1)
fee = options[:fee] || DEFAULT_FEE
payment = Stellar::TransactionBuilder.create_account(
    source_account: funder.keypair,
    sequence_number: sequence,
    base_fee: fee,
    destination: options[:account].keypair,
    starting_balance: options[:starting_balance]
  )
  envelope = payment.to_envelope(funder.keypair)
  submit_transaction(tx_envelope: envelope)
end

问题发生在 submit_transaction(tx_envelope:envelope) evelop 上有正确的数据关于这个问题的任何建议。

4

0 回答 0