Skip to content

Commit d210bcf

Browse files
committed
fix: default and propagate the poolFee and protocolFee in treasury
1 parent ed6b84a commit d210bcf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/treasury/bundles/install-on-chain.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import stablecoinBundle from './bundle-stablecoinMachine';
99
const SECONDS_PER_HOUR = 60n * 60n;
1010
const SECONDS_PER_DAY = 24n * SECONDS_PER_HOUR;
1111

12+
const DEFAULT_POOL_FEE = 24n;
13+
const DEFAULT_PROTOCOL_FEE = 6n;
1214
/**
1315
* @param {Object} param0
1416
* @param {ERef<NameHub>} param0.agoricNames
@@ -19,8 +21,10 @@ const SECONDS_PER_DAY = 24n * SECONDS_PER_HOUR;
1921
* @param {ERef<PriceAuthority>} param0.priceAuthority
2022
* @param {ERef<ZoeService>} param0.zoe
2123
* @param {NatValue} param0.bootstrapPaymentValue
24+
* @param {NatValue} [param0.poolFee]
25+
* @param {NatValue} [param0.protocolFee]
2226
*/
23-
export async function installOnChain({ agoricNames, board, centralName, chainTimerService, nameAdmins, priceAuthority, zoe, bootstrapPaymentValue }) {
27+
export async function installOnChain({ agoricNames, board, centralName, chainTimerService, nameAdmins, priceAuthority, zoe, bootstrapPaymentValue, poolFee = DEFAULT_POOL_FEE, protocolFee = DEFAULT_PROTOCOL_FEE }) {
2428
// Fetch the nameAdmins we need.
2529
const [brandAdmin, installAdmin, instanceAdmin, issuerAdmin, uiConfigAdmin] = await Promise.all(
2630
['brand', 'installation', 'instance', 'issuer', 'uiConfig'].map(async edge => {
@@ -45,6 +49,8 @@ export async function installOnChain({ agoricNames, board, centralName, chainTim
4549
const loanParams = {
4650
chargingPeriod: SECONDS_PER_HOUR,
4751
recordingPeriod: SECONDS_PER_DAY,
52+
poolFee,
53+
protocolFee,
4854
};
4955

5056
const terms = harden({

0 commit comments

Comments
 (0)