|
650 | 650 | ], |
651 | 651 | "result": { |
652 | 652 | "name": "result", |
653 | | - "description": "the fee estimations", |
| 653 | + "description": "The fee estimations", |
654 | 654 | "schema": { |
655 | 655 | "title": "Estimation", |
656 | 656 | "type": "array", |
|
694 | 694 | ], |
695 | 695 | "result": { |
696 | 696 | "name": "result", |
697 | | - "description": "the fee estimation", |
| 697 | + "description": "The fee estimation", |
698 | 698 | "schema": { |
699 | | - "$ref": "#/components/schemas/FEE_ESTIMATE" |
| 699 | + "$ref": "#/components/schemas/MESSAGE_FEE_ESTIMATE" |
700 | 700 | } |
701 | 701 | }, |
702 | 702 | "errors": [ |
|
3481 | 3481 | "enum": ["SKIP_VALIDATE"], |
3482 | 3482 | "description": "Flags that indicate how to simulate a given transaction. By default, the sequencer behavior is replicated locally" |
3483 | 3483 | }, |
3484 | | - "PRICE_UNIT": { |
3485 | | - "title": "price unit", |
| 3484 | + "PRICE_UNIT_WEI": { |
| 3485 | + "title": "Price unit wei", |
3486 | 3486 | "type": "string", |
3487 | | - "enum": ["WEI", "FRI"] |
| 3487 | + "enum": ["WEI"] |
3488 | 3488 | }, |
3489 | | - "FEE_ESTIMATE": { |
3490 | | - "title": "Fee estimation", |
| 3489 | + "PRICE_UNIT_FRI": { |
| 3490 | + "title": "Price unit fri", |
| 3491 | + "type": "string", |
| 3492 | + "enum": ["FRI"] |
| 3493 | + }, |
| 3494 | + "PRICE_UNIT": { |
| 3495 | + "title": "Price unit", |
| 3496 | + "description": "Units in which the fee is given", |
| 3497 | + "oneOf": [ |
| 3498 | + { |
| 3499 | + "$ref": "#/components/schemas/PRICE_UNIT_WEI" |
| 3500 | + }, |
| 3501 | + { |
| 3502 | + "$ref": "#/components/schemas/PRICE_UNIT_FRI" |
| 3503 | + } |
| 3504 | + ] |
| 3505 | + }, |
| 3506 | + "FEE_ESTIMATE_COMMON": { |
| 3507 | + "title": "Fee estimation common fields", |
3491 | 3508 | "type": "object", |
3492 | 3509 | "properties": { |
3493 | 3510 | "l1_gas_consumed": { |
|
3524 | 3541 | "title": "Overall fee", |
3525 | 3542 | "description": "The estimated fee for the transaction (in wei or fri, depending on the tx version), equals to l1_gas_consumed*l1_gas_price + l1_data_gas_consumed*l1_data_gas_price + l2_gas_consumed*l2_gas_price", |
3526 | 3543 | "$ref": "#/components/schemas/u128" |
3527 | | - }, |
3528 | | - "unit": { |
3529 | | - "title": "Fee unit", |
3530 | | - "description": "units in which the fee is given", |
3531 | | - "$ref": "#/components/schemas/PRICE_UNIT" |
3532 | 3544 | } |
3533 | 3545 | }, |
3534 | 3546 | "required": [ |
|
3538 | 3550 | "l2_gas_price", |
3539 | 3551 | "l1_data_gas_consumed", |
3540 | 3552 | "l1_data_gas_price", |
3541 | | - "overall_fee", |
3542 | | - "unit" |
| 3553 | + "overall_fee" |
| 3554 | + ] |
| 3555 | + }, |
| 3556 | + "FEE_ESTIMATE": { |
| 3557 | + "title": "Fee estimation", |
| 3558 | + "allOf": [ |
| 3559 | + { |
| 3560 | + "$ref": "#/components/schemas/FEE_ESTIMATE_COMMON" |
| 3561 | + }, |
| 3562 | + { |
| 3563 | + "type": "object", |
| 3564 | + "properties": { |
| 3565 | + "unit": { |
| 3566 | + "title": "Fee unit", |
| 3567 | + "description": "Units in which the fee is given, can only be FRI", |
| 3568 | + "$ref": "#/components/schemas/PRICE_UNIT_FRI" |
| 3569 | + } |
| 3570 | + }, |
| 3571 | + "required": ["unit"] |
| 3572 | + } |
| 3573 | + ] |
| 3574 | + }, |
| 3575 | + "MESSAGE_FEE_ESTIMATE": { |
| 3576 | + "title": "Message fee estimation", |
| 3577 | + "allOf": [ |
| 3578 | + { |
| 3579 | + "$ref": "#/components/schemas/FEE_ESTIMATE_COMMON" |
| 3580 | + }, |
| 3581 | + { |
| 3582 | + "type": "object", |
| 3583 | + "properties": { |
| 3584 | + "unit": { |
| 3585 | + "title": "Fee unit", |
| 3586 | + "description": "Units in which the fee is given, can only be WEI", |
| 3587 | + "$ref": "#/components/schemas/PRICE_UNIT_WEI" |
| 3588 | + } |
| 3589 | + }, |
| 3590 | + "required": ["unit"] |
| 3591 | + } |
3543 | 3592 | ] |
3544 | 3593 | }, |
3545 | 3594 | "FEE_PAYMENT": { |
|
0 commit comments