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
Noting some things we see along the way that can be improved, especially in the context of them being deployed in the DAO.
constant token-supply can call get-total-supply in token contract
constants VIRTUAL_STX_VALUE and COMPLETE_FEE could be computed inline (20% and 2%)
constant BURN_ADDRESS can be removed in favor of calling ft-burn? in the token contract
in initialization, token-balance could be set by calling get-balance in the token contract for (as-contract tx-sender)
These optimizations take advantage of the token contract being deployed first so we can create functions that call it versus using a sip-010 trait and matching value.
The text was updated successfully, but these errors were encountered:
Noting some things we see along the way that can be improved, especially in the context of them being deployed in the DAO.
token-supply
can callget-total-supply
in token contractVIRTUAL_STX_VALUE
andCOMPLETE_FEE
could be computed inline (20% and 2%)BURN_ADDRESS
can be removed in favor of callingft-burn?
in the token contracttoken-balance
could be set by callingget-balance
in the token contract for(as-contract tx-sender)
These optimizations take advantage of the token contract being deployed first so we can create functions that call it versus using a sip-010 trait and matching value.
The text was updated successfully, but these errors were encountered: