File: src/governor.ts:60-77 (parseGovernorConfig), src/types/index.ts (GovernorConfig)
The on-chain GovernorConfig struct (contracts/governor/src/config.rs) is:
pub struct GovernorConfig {
pub fee_bps: u32,
pub fee_recipient: Address,
pub min_duration_seconds: u64,
pub max_duration_seconds: u64, // <-- returned by DripGovernor::config()
pub max_rate_per_second: i128,
pub factory_address: Address,
}
parseGovernorConfig reads fee_bps, min_duration_seconds, max_rate_per_second,
fee_recipient and factory_address — but never reads max_duration_seconds, and
the SDK's GovernorConfig type has no field for it.
Impact
client.governor.getConfig() cannot tell a caller the protocol's maximum stream
duration, even though the contract enforces it (extend_duration /
top_up_and_extend reject durations over max_duration_seconds). A client that
wants to validate a stream length before submitting has no way to read the bound.
Suggested fix
Add maxDurationSeconds: number to GovernorConfig and parse
m['max_duration_seconds'] the same way as min_duration_seconds.
File:
src/governor.ts:60-77(parseGovernorConfig),src/types/index.ts(GovernorConfig)The on-chain
GovernorConfigstruct (contracts/governor/src/config.rs) is:parseGovernorConfigreadsfee_bps,min_duration_seconds,max_rate_per_second,fee_recipientandfactory_address— but never readsmax_duration_seconds, andthe SDK's
GovernorConfigtype has no field for it.Impact
client.governor.getConfig()cannot tell a caller the protocol's maximum streamduration, even though the contract enforces it (
extend_duration/top_up_and_extendreject durations overmax_duration_seconds). A client thatwants to validate a stream length before submitting has no way to read the bound.
Suggested fix
Add
maxDurationSeconds: numbertoGovernorConfigand parsem['max_duration_seconds']the same way asmin_duration_seconds.