0xMiden / 0xMiden/protocol

Change the signature of auth scripts to accept `FEE_ARGS` in addition to `AUTH_ARGS`

Đang mở
#3,316 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
fees kernels
Ngôn ngữ chính
Rust
Star
132
Fork
167
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
110

Mô tả

I think a cleaner approach would be to change the signature to accept "fee args" as a second word - i.g.:

```
pub type FeeArgs = struct { faucet_id: AccountId, rate: ConversionRate }
pub type ConversionRate = struct { lo: felt, hi: felt }

#! Inputs: [AUTH_ARGS, FEE_ARGS, pad(8)]
#! Outputs: [pad(16)]
#!
#! Invocation: call
@auth_script
pub proc auth_tx(auth_args: word, fee_args: FeeArgs)
...
end
```

This is a bit more work though - so, probably best to do in a follow-up.

_Originally posted by @bobbinth in https://github.com/0xMiden/protocol/pull/3298#discussion_r3583044185_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.