@@ -50,38 +50,46 @@ Please refer to the [`haskell/`](/haskell/) directory for details.
50
50
## Gas / Transaction costs
51
51
52
52
The tables below show the gas and transaction costs of both versions (FA1.2 and FA2) of
53
- the stablecoin contract [ v1.7.2 ] ( https://github.com/tqtezos/stablecoin/releases/tag/v1.7.2 ) in hangzhounet .
53
+ the stablecoin contract [ v1.7.3 ] ( https://github.com/tqtezos/stablecoin/releases/tag/v1.7.3 ) in jakartanet .
54
54
55
- ### hangzhounet
55
+ ### jakartanet
56
56
57
- * [ FA1.2 operations] ( https://hangzhou.tzstats.com/KT1PoKKx4LZUE23EAoX416dzN8TWZXu8fF8k )
58
- * [ FA2 operations] ( https://hangzhou.tzstats.com/KT197sCXNP8q1tFmqzQxyJHaXrTQBaa9Qcbo )
57
+ * [ FA1.2 operations] ( https://better-call.dev/jakartanet/KT1ASuzkJzZ2pCqYVKeV48p5yxunynrjmdGE/operations )
58
+ * [ FA2 operations] ( https://better-call.dev/jakartanet/KT19mksNfM9XjWqapR2iMywM1ic5kbVQwpjB/operations )
59
59
60
60
| | FA1.2 Gas cost | FA2 Gas cost | FA1.2 Tx cost | FA2 Tx cost |
61
61
| ----------- | -------------- | ------------ | ------------- | ----------- |
62
- | origination | 7477 | 8410 | 2.89527 ꜩ | 2.874531 ꜩ |
63
- | transfer | 9573 | 10737 | 0.001294 ꜩ | 0.001427 ꜩ |
62
+ | origination | 5743 | 5809 | 2.381299 ꜩ | 2.414438 ꜩ |
63
+ | transfer | 6659 | 7003 | 0.001001 ꜩ | 0.001053 ꜩ |
64
64
65
65
### Measuring
66
66
67
67
To measure and collect these numbers:
68
- 1 . Configure your ` tezos-client ` to use a current testnet node
69
- 1 . Make sure ` tezos-client ` has a ` nettest ` alias with enough ꜩ
68
+ 1 . Pick a testnet:
70
69
```
71
- tezos-client get balance for nettest
70
+ export STABLECOIN_TESTNET=https://jakarta.testnet.tezos.serokell.team/
72
71
```
73
- 1. Run `cd haskell && stack test stablecoin:test:stablecoin-nettest`
74
-
75
- This deploys the FA2 and FA1.2 contracts along with the corresponding
76
- metadata contracts. So metadata is deployed to separate contracts and linked
77
- from the main contracts via the TZIP-016 metadata URI. After this some tests
78
- on the deployed contracts. (The origination costs in the table above does
79
- not include origination costs of these metadata contracts).
72
+ 1. Use a [testnet faucet](https://teztnets.xyz/) to create a test account with enough funds.
73
+ 1. Activate the account:
74
+ ```
75
+ tezos-client -E $STABLECOIN_TESTNET activate account stablecoin-moneybag with <activation_file.json>
76
+ ```
77
+ 1. Run:
78
+ ```bash
79
+ cd haskell
80
+ stack test --fast --test-arguments \
81
+ "-p \"Lorentz.Contracts.Nettest.FA1_2Comparison\" \
82
+ --cleveland-mode only-network \
83
+ --cleveland-moneybag-alias stablecoin-moneybag \
84
+ -E $STABLECOIN_TESTNET"
85
+ ```
86
+ This deploys the FA2 and FA1.2 contracts (the TZIP-16 metadata will be stored in separate contracts),
87
+ and calls the `transfer` entrypoint of each contract.
80
88
81
89
1. The logs should show these two messages, with two addresses:
82
90
```
83
- Originated smart contract Stablecoin FA1.2 with address <...>
84
- Originated smart contract Stablecoin FA2 with address <...>
91
+ Originated smart contract ' Stablecoin FA1.2' with address <...>
92
+ Originated smart contract ' Stablecoin FA2' with address <...>
85
93
```
86
94
1. Search for these addresses in <https://better-call.dev/>, select the "Contracts" tab, you should get 1 search result.
87
95
Select it to see the origination and transfer costs.
0 commit comments