You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int get_compute_fee(int workchain, int gas_used) asm(gas_used workchain) "GETGASFEE";
2
2
3
-
;; The actual gas used for the transaction is 350166 but we add ~10% (385182.6) and round up (390000) to be on the safe side because the amount of gas used can vary based on the current state of the blockchain
4
-
const int UPDATE_PRICE_FEEDS_GAS = 390000;
3
+
;; 1 update: 262,567 gas
4
+
;; 2 updates: 347,791 (+85,224)
5
+
;; 3 updates: 431,504 (+83,713)
6
+
;; 4 updates: 514,442 (+82,938)
7
+
;; 5 updates: 604,247 (+89,805)
8
+
;; 6 updates: 683,113 (+78,866)
9
+
;; 10 updates: 947,594
10
+
;; Upper bound gas increase per additional update: ~90,000
11
+
;; Base cost (1 update): ~262,567 gas
12
+
const UPDATE_PRICE_FEEDS_BASE_GAS = 300000; ;; Base cost + 10% safety margin rounded up because the amount of gas used can vary based on the current state of the blockchain
13
+
const UPDATE_PRICE_FEEDS_PER_UPDATE_GAS = 90000; ;; Per update cost
0 commit comments