Skip to content

Commit e83b995

Browse files
committed
Update reflect schema
1 parent 298a421 commit e83b995

File tree

2 files changed

+138
-66
lines changed

2 files changed

+138
-66
lines changed

contracts/reflect/schema/execute_msg.json

Lines changed: 69 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@
340340
"required": [
341341
"amount",
342342
"channel_id",
343+
"timeout",
343344
"to_address"
344345
],
345346
"properties": {
@@ -355,26 +356,14 @@
355356
"description": "exisiting channel to send the tokens over",
356357
"type": "string"
357358
},
358-
"timeout_block": {
359-
"description": "block after which the packet times out. at least one of timeout_block, timeout_timestamp is required",
360-
"anyOf": [
361-
{
362-
"$ref": "#/definitions/IbcTimeoutBlock"
363-
},
359+
"timeout": {
360+
"description": "when packet times out, measured on remote chain",
361+
"allOf": [
364362
{
365-
"type": "null"
363+
"$ref": "#/definitions/IbcTimeout"
366364
}
367365
]
368366
},
369-
"timeout_timestamp": {
370-
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_block, timeout_timestamp is required",
371-
"type": [
372-
"integer",
373-
"null"
374-
],
375-
"format": "uint64",
376-
"minimum": 0.0
377-
},
378367
"to_address": {
379368
"description": "address on the remote chain to receive these tokens",
380369
"type": "string"
@@ -395,7 +384,8 @@
395384
"type": "object",
396385
"required": [
397386
"channel_id",
398-
"data"
387+
"data",
388+
"timeout"
399389
],
400390
"properties": {
401391
"channel_id": {
@@ -404,25 +394,13 @@
404394
"data": {
405395
"$ref": "#/definitions/Binary"
406396
},
407-
"timeout_block": {
408-
"description": "block height after which the packet times out. at least one of timeout_block, timeout_timestamp is required",
409-
"anyOf": [
410-
{
411-
"$ref": "#/definitions/IbcTimeoutBlock"
412-
},
397+
"timeout": {
398+
"description": "when packet times out, measured on remote chain",
399+
"allOf": [
413400
{
414-
"type": "null"
401+
"$ref": "#/definitions/IbcTimeout"
415402
}
416403
]
417-
},
418-
"timeout_timestamp": {
419-
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_block, timeout_timestamp is required",
420-
"type": [
421-
"integer",
422-
"null"
423-
],
424-
"format": "uint64",
425-
"minimum": 0.0
426404
}
427405
}
428406
}
@@ -452,6 +430,64 @@
452430
}
453431
]
454432
},
433+
"IbcTimeout": {
434+
"anyOf": [
435+
{
436+
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out (measured on the remote chain) See https://golang.org/pkg/time/#Time.UnixNano",
437+
"type": "object",
438+
"required": [
439+
"timestamp_nanos"
440+
],
441+
"properties": {
442+
"timestamp_nanos": {
443+
"type": "integer",
444+
"format": "uint64",
445+
"minimum": 0.0
446+
}
447+
},
448+
"additionalProperties": false
449+
},
450+
{
451+
"description": "block after which the packet times out (measured on remote chain)",
452+
"type": "object",
453+
"required": [
454+
"block"
455+
],
456+
"properties": {
457+
"block": {
458+
"$ref": "#/definitions/IbcTimeoutBlock"
459+
}
460+
},
461+
"additionalProperties": false
462+
},
463+
{
464+
"type": "object",
465+
"required": [
466+
"both"
467+
],
468+
"properties": {
469+
"both": {
470+
"type": "object",
471+
"required": [
472+
"block",
473+
"timestamp_nanos"
474+
],
475+
"properties": {
476+
"block": {
477+
"$ref": "#/definitions/IbcTimeoutBlock"
478+
},
479+
"timestamp_nanos": {
480+
"type": "integer",
481+
"format": "uint64",
482+
"minimum": 0.0
483+
}
484+
}
485+
}
486+
},
487+
"additionalProperties": false
488+
}
489+
]
490+
},
455491
"IbcTimeoutBlock": {
456492
"description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)",
457493
"type": "object",

contracts/reflect/schema/response_for__custom_msg.json

Lines changed: 69 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@
328328
"required": [
329329
"amount",
330330
"channel_id",
331+
"timeout",
331332
"to_address"
332333
],
333334
"properties": {
@@ -343,26 +344,14 @@
343344
"description": "exisiting channel to send the tokens over",
344345
"type": "string"
345346
},
346-
"timeout_block": {
347-
"description": "block after which the packet times out. at least one of timeout_block, timeout_timestamp is required",
348-
"anyOf": [
349-
{
350-
"$ref": "#/definitions/IbcTimeoutBlock"
351-
},
347+
"timeout": {
348+
"description": "when packet times out, measured on remote chain",
349+
"allOf": [
352350
{
353-
"type": "null"
351+
"$ref": "#/definitions/IbcTimeout"
354352
}
355353
]
356354
},
357-
"timeout_timestamp": {
358-
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_block, timeout_timestamp is required",
359-
"type": [
360-
"integer",
361-
"null"
362-
],
363-
"format": "uint64",
364-
"minimum": 0.0
365-
},
366355
"to_address": {
367356
"description": "address on the remote chain to receive these tokens",
368357
"type": "string"
@@ -383,7 +372,8 @@
383372
"type": "object",
384373
"required": [
385374
"channel_id",
386-
"data"
375+
"data",
376+
"timeout"
387377
],
388378
"properties": {
389379
"channel_id": {
@@ -392,25 +382,13 @@
392382
"data": {
393383
"$ref": "#/definitions/Binary"
394384
},
395-
"timeout_block": {
396-
"description": "block height after which the packet times out. at least one of timeout_block, timeout_timestamp is required",
397-
"anyOf": [
398-
{
399-
"$ref": "#/definitions/IbcTimeoutBlock"
400-
},
385+
"timeout": {
386+
"description": "when packet times out, measured on remote chain",
387+
"allOf": [
401388
{
402-
"type": "null"
389+
"$ref": "#/definitions/IbcTimeout"
403390
}
404391
]
405-
},
406-
"timeout_timestamp": {
407-
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_block, timeout_timestamp is required",
408-
"type": [
409-
"integer",
410-
"null"
411-
],
412-
"format": "uint64",
413-
"minimum": 0.0
414392
}
415393
}
416394
}
@@ -440,6 +418,64 @@
440418
}
441419
]
442420
},
421+
"IbcTimeout": {
422+
"anyOf": [
423+
{
424+
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out (measured on the remote chain) See https://golang.org/pkg/time/#Time.UnixNano",
425+
"type": "object",
426+
"required": [
427+
"timestamp_nanos"
428+
],
429+
"properties": {
430+
"timestamp_nanos": {
431+
"type": "integer",
432+
"format": "uint64",
433+
"minimum": 0.0
434+
}
435+
},
436+
"additionalProperties": false
437+
},
438+
{
439+
"description": "block after which the packet times out (measured on remote chain)",
440+
"type": "object",
441+
"required": [
442+
"block"
443+
],
444+
"properties": {
445+
"block": {
446+
"$ref": "#/definitions/IbcTimeoutBlock"
447+
}
448+
},
449+
"additionalProperties": false
450+
},
451+
{
452+
"type": "object",
453+
"required": [
454+
"both"
455+
],
456+
"properties": {
457+
"both": {
458+
"type": "object",
459+
"required": [
460+
"block",
461+
"timestamp_nanos"
462+
],
463+
"properties": {
464+
"block": {
465+
"$ref": "#/definitions/IbcTimeoutBlock"
466+
},
467+
"timestamp_nanos": {
468+
"type": "integer",
469+
"format": "uint64",
470+
"minimum": 0.0
471+
}
472+
}
473+
}
474+
},
475+
"additionalProperties": false
476+
}
477+
]
478+
},
443479
"IbcTimeoutBlock": {
444480
"description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)",
445481
"type": "object",

0 commit comments

Comments
 (0)