BoostryJP / ibet-Wallet-API

A powerful API suite for seamlessly building ibet blockchain wallet systems 🛠
https://ibet.jp/ibet-for-fin
Apache License 2.0
9 stars 0 forks source link

[FEATURE]JDR購入時に用いるSwapコントラクトのアドレスとABIのAPI #386

Closed horsewin closed 5 years ago

horsewin commented 5 years ago

現状の課題

ソリューション案

In

なし

Out

Status: 200 OK

    "meta": {
      "code": 200,
      "message": "OK"
    },
    "data": {
      "payment_gateway_address": "0x・・・",
      "payment_gateway_abi": [・・・],
      "personal_info_address": "0x・・・",
      "personal_info_abi": [・・・ ],
      "ibet_exchange_address": "0x・・・",
      "ibet_exchange_abi": [・・・],
      "ibet_membership_exchange_address": "0x・・・",
      "ibet_membership_exchange_abi": [・・・ ],
      "ibet_coupon_exchange_address": "0x・・・",
      "ibet_coupon_exchange_abi": [・・・],
      "ibet_mrf_exchange_address": "★可能ならばここも追加★",
      "ibet_mrf_exchange_abi": [""★可能ならばここも追加★""],
      "ibet_jdr_exchange_address": "★☆今回追加対象★☆",
      "ibet_jdr_exchange_abi": [""★☆今回追加対象★☆""],
      "agent_address": "0x・・・"
    }
  },

※追加するプロパティ名でexchangeにするかswapにするかはお任せします(._.)

YoshihitoAso commented 5 years ago

最終版ですが下記のようになります。 SWAPで、MRFとDR(depositaryreceipt)の交換を行うので、今回Swap関連の1組(Address, ABI)が追加になります。 あと追加ですみません、ibet_exchange は債券関連ですが、このタイミングで「ibet_straightbond_exchange_address」「ibet_straightbond_exchange_abi」に修正しようと思います。

nodeInfo = {
            'payment_gateway_address': config.PAYMENT_GATEWAY_CONTRACT_ADDRESS,
            'payment_gateway_abi': contracts['PaymentGateway']['abi'],
            'personal_info_address': config.PERSONAL_INFO_CONTRACT_ADDRESS,
            'personal_info_abi': contracts['PersonalInfo']['abi'],
            'ibet_straightbond_exchange_address': config.IBET_SB_EXCHANGE_CONTRACT_ADDRESS,
            'ibet_straightbond_exchange_abi': contracts['IbetStraightBondExchange']['abi'],
            'ibet_membership_exchange_address': config.IBET_MEMBERSHIP_EXCHANGE_CONTRACT_ADDRESS,
            'ibet_membership_exchange_abi': contracts['IbetMembershipExchange']['abi'],
            'ibet_coupon_exchange_address': config.IBET_CP_EXCHANGE_CONTRACT_ADDRESS,
            'ibet_coupon_exchange_abi': contracts['IbetCouponExchange']['abi'],
            'ibet_depositaryreceipt_swap_address': config.IBET_JDR_SWAP_CONTRACT_ADDRESS,
            'ibet_depositaryreceipt_swap_abi': contracts['IbetSwap']['abi'],
            'agent_address': config.AGENT_ADDRESS,
        }