Beispiel #1
0
        private static dynamic DepositResult(JArray jValue)
        {
            dynamic depositLog = new ExpandoObject();

            depositLog.Address = ZoroHelper.GetJsonAddress((JObject)jValue[1]);
            depositLog.AssetId = ZoroHelper.GetJsonHash((JObject)jValue[2]);
            depositLog.Amount  = ZoroHelper.GetJsonDecimal((JObject)jValue[3], 8);

            return(depositLog);
        }
Beispiel #2
0
        private static dynamic CancelOffer(JArray notifications)
        {
            dynamic cancelOfferLog = new ExpandoObject();

            cancelOfferLog.OfferAddress    = ZoroHelper.GetJsonAddress((JObject)notifications[1]);
            cancelOfferLog.OfferHash       = notifications[2]["value"].ToString();
            cancelOfferLog.NftHash         = ZoroHelper.GetJsonHash((JObject)notifications[3]);
            cancelOfferLog.TokenId         = notifications[4]["value"].ToString();
            cancelOfferLog.OfferFeeAssetId = ZoroHelper.GetJsonHash((JObject)notifications[5]);
            cancelOfferLog.FeeReturnAmount = ZoroHelper.GetJsonDecimal((JObject)notifications[6], 8);
            cancelOfferLog.DeductFee       = ZoroHelper.GetJsonDecimal((JObject)notifications[7], 8);
            return(cancelOfferLog);
        }
Beispiel #3
0
        private static dynamic MakeOfferResult(JArray notifications)
        {
            dynamic makeOfferLog = new ExpandoObject();

            makeOfferLog.Address         = ZoroHelper.GetJsonAddress((JObject)notifications[1]);
            makeOfferLog.OfferHash       = notifications[2]["value"].ToString();
            makeOfferLog.NftContractHash = ZoroHelper.GetJsonHash((JObject)notifications[3]);
            makeOfferLog.TokenId         = notifications[4]["value"].ToString();
            makeOfferLog.AcceptAssetId   = ZoroHelper.GetJsonHash((JObject)notifications[5]);
            makeOfferLog.Price           = ZoroHelper.GetJsonDecimal((JObject)notifications[6], 8);
            makeOfferLog.FeeAssetId      = ZoroHelper.GetJsonHash((JObject)notifications[7]);
            makeOfferLog.FeeAmount       = ZoroHelper.GetJsonDecimal((JObject)notifications[8], 8);

            return(makeOfferLog);
        }
Beispiel #4
0
        private static dynamic FillOfferResult(JArray notifications)
        {
            dynamic fillOfferLog = new ExpandoObject();

            fillOfferLog.FillAddress     = ZoroHelper.GetJsonAddress((JObject)notifications[1]);
            fillOfferLog.OfferHash       = notifications[2]["value"].ToString();
            fillOfferLog.OfferAddress    = ZoroHelper.GetJsonAddress((JObject)notifications[3]);
            fillOfferLog.FillAssetId     = ZoroHelper.GetJsonHash((JObject)notifications[4]);
            fillOfferLog.FillAmount      = ZoroHelper.GetJsonDecimal((JObject)notifications[5], 8);
            fillOfferLog.NftHash         = ZoroHelper.GetJsonHash((JObject)notifications[6]);
            fillOfferLog.TokenId         = notifications[7]["value"].ToString();
            fillOfferLog.FillFeeAssetId  = ZoroHelper.GetJsonHash((JObject)notifications[8]);
            fillOfferLog.FillFeeAmount   = ZoroHelper.GetJsonDecimal((JObject)notifications[9], 8);
            fillOfferLog.OfferFeeAssetId = ZoroHelper.GetJsonHash((JObject)notifications[10]);
            fillOfferLog.OfferFeeAmount  = ZoroHelper.GetJsonDecimal((JObject)notifications[11], 8);

            return(fillOfferLog);
        }