jim380 / Re

FIX protocol on blockchain
https://cyphercore.io/re
Apache License 2.0
3 stars 1 forks source link

add chainID to make API Query dynamic for each chains #117

Closed uwezukwechibuzor closed 11 months ago

uwezukwechibuzor commented 11 months ago

Each FIX message type may require the inclusion of a chainID.

uwezukwechibuzor commented 11 months ago
message Header {
  string beginString = 1;
  int64 bodyLength = 2;
  string msgType = 3;
  string senderCompID = 4;
  string targetCompID = 5;
  int64 msgSeqNum = 6;
  string sendingTime = 7;

  // Add a new field for chain ID
  string chainID = 8;
}

the standard header is modified to include chainID

uwezukwechibuzor commented 11 months ago
message MsgLogonInitiator {
  string sessionID = 1;
  LogonInitiator logonInitiator = 2;
  string status = 3;
  bool IsAccepted = 4;
  string initiatorAddress = 5;
  string chainID = 6;
}

chainID is only passed here through the Header, this makes it accessible to types

uwezukwechibuzor commented 11 months ago

The API has been dynamically refactored to use http://localhost:1317/jim380/Re/fix/sessions/{chainID}.