Skip to content

Commit

Permalink
chore: update migration notes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Aug 7, 2024
1 parent 7d876f2 commit bb3e728
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
23 changes: 18 additions & 5 deletions docs/docs/migration_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ keywords: [sandbox, aztec, notes, migration, updating, upgrading]

Aztec is in full-speed development. Literally every version breaks compatibility with the previous ones. This page attempts to target errors and difficulties you might encounter when upgrading, and how to resolve them.

## 0.48.0

### Fee Juice rename

The name of the canonical Gas contract has changed to Fee Juice. Update noir code:

```diff
-GasToken::at(contract_address)
+FeeJuice::at(contract_address)
```

Additionally, `NativePaymentMethod` and `NativePaymentMethodWithClaim` have been renamed to `FeeJuicePaymentMethod` and `FeeJuicePaymentMethodWithClaim`.

## 0.47.0

# [Aztec sandbox] TXE deployment changes
Expand Down Expand Up @@ -535,13 +548,13 @@ It is now possible to import contracts on another contracts and use their automa

```diff
- context.call_public_function(
- storage.fee_juice_address.read_private(),
- storage.gas_token_address.read_private(),
- FunctionSelector::from_signature("pay_fee(Field)"),
- [42]
- );
-
- context.call_public_function(
- storage.fee_juice_address.read_private(),
- storage.gas_token_address.read_private(),
- FunctionSelector::from_signature("pay_fee(Field)"),
- [42]
- );
Expand All @@ -556,14 +569,14 @@ It is now possible to import contracts on another contracts and use their automa
- nonce
- ]
- );
+ use dep::fee_juice::FeeJuice;
+ use dep::gas_token::GasToken;
+ use dep::token::Token;
+
+ ...
+ // Public call from public land
+ FeeJuice::at(storage.fee_juice_address.read_private()).pay_fee(42).call(&mut context);
+ GasToken::at(storage.gas_token_address.read_private()).pay_fee(42).call(&mut context);
+ // Public call from private land
+ FeeJuice::at(storage.fee_juice_address.read_private()).pay_fee(42).enqueue(&mut context);
+ GasToken::at(storage.gas_token_address.read_private()).pay_fee(42).enqueue(&mut context);
+ // Private call from private land
+ Token::at(asset).transfer(context.msg_sender(), storage.subscription_recipient_address.read_private(), amount, nonce).call(&mut context);
```
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/end-to-end/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ e2e-fees-dapp-subscription:
e2e-fees-failures:
DO +E2E_TEST --test=./src/e2e_fees/failures.test.ts

e2e-fees-native-payments:
DO +E2E_TEST --test=./src/e2e_fees/native_payments.test.ts
e2e-fees-fee-juice-payments:
DO +E2E_TEST --test=./src/e2e_fees/fee_juice_payments.test.ts

e2e-fees-account-init:
DO +E2E_TEST --test=./src/e2e_fees/account_init.test.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { type TokenContract as BananaCoin, type FeeJuiceContract } from '@aztec/

import { FeesTest } from './fees_test.js';

describe('e2e_fees native_payments', () => {
describe('e2e_fees Fee Juice payments', () => {
let aliceAddress: AztecAddress;
let aliceWallet: AccountWallet;
let bobAddress: AztecAddress;
Expand All @@ -18,7 +18,7 @@ describe('e2e_fees native_payments', () => {
let feeJuiceContract: FeeJuiceContract;
let paymentMethod: FeeJuicePaymentMethod;

const t = new FeesTest('native_payments');
const t = new FeesTest('fee_juice');

beforeAll(async () => {
await t.applyBaseSnapshots();
Expand Down

0 comments on commit bb3e728

Please sign in to comment.