{"version":3,"file":"governance.mjs","names":["vec_map.VecMap","trade_params.TradeParams"],"sources":["../../../src/contracts/deepbook/governance.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Governance module handles the governance of the `Pool` that it's attached to.\n * Users with non zero stake can create proposals and vote on them. Winning\n * proposals are used to set the trade parameters for the next epoch.\n */\n\nimport { MoveStruct } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport * as vec_map from './deps/sui/vec_map.js';\nimport * as trade_params from './trade_params.js';\nconst $moduleName = '@deepbook/core::governance';\nexport const Proposal = new MoveStruct({\n\tname: `${$moduleName}::Proposal`,\n\tfields: {\n\t\ttaker_fee: bcs.u64(),\n\t\tmaker_fee: bcs.u64(),\n\t\tstake_required: bcs.u64(),\n\t\tvotes: bcs.u64(),\n\t},\n});\nexport const Governance = new MoveStruct({\n\tname: `${$moduleName}::Governance`,\n\tfields: {\n\t\t/** Tracks refreshes. */\n\t\tepoch: bcs.u64(),\n\t\t/** If Pool is whitelisted. */\n\t\twhitelisted: bcs.bool(),\n\t\t/** If Pool is stable or volatile. */\n\t\tstable: bcs.bool(),\n\t\t/** List of proposals for the current epoch. */\n\t\tproposals: vec_map.VecMap(bcs.Address, Proposal),\n\t\t/** Trade parameters for the current epoch. */\n\t\ttrade_params: trade_params.TradeParams,\n\t\t/** Trade parameters for the next epoch. */\n\t\tnext_trade_params: trade_params.TradeParams,\n\t\t/** All voting power from the current stakes. */\n\t\tvoting_power: bcs.u64(),\n\t\t/** Quorum for the current epoch. */\n\t\tquorum: bcs.u64(),\n\t},\n});\nexport const TradeParamsUpdateEvent = new MoveStruct({\n\tname: `${$moduleName}::TradeParamsUpdateEvent`,\n\tfields: {\n\t\ttaker_fee: bcs.u64(),\n\t\tmaker_fee: bcs.u64(),\n\t\tstake_required: bcs.u64(),\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,cAAc;AACpB,MAAa,WAAW,IAAI,WAAW;CACtC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,WAAW,IAAI,KAAK;EACpB,WAAW,IAAI,KAAK;EACpB,gBAAgB,IAAI,KAAK;EACzB,OAAO,IAAI,KAAK;EAChB;CACD,CAAC;AACF,MAAa,aAAa,IAAI,WAAW;CACxC,MAAM,GAAG,YAAY;CACrB,QAAQ;EAEP,OAAO,IAAI,KAAK;EAEhB,aAAa,IAAI,MAAM;EAEvB,QAAQ,IAAI,MAAM;EAElB,WAAWA,OAAe,IAAI,SAAS,SAAS;EAEhD,cAAcC;EAEd,mBAAmBA;EAEnB,cAAc,IAAI,KAAK;EAEvB,QAAQ,IAAI,KAAK;EACjB;CACD,CAAC;AACF,MAAa,yBAAyB,IAAI,WAAW;CACpD,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,WAAW,IAAI,KAAK;EACpB,WAAW,IAAI,KAAK;EACpB,gBAAgB,IAAI,KAAK;EACzB;CACD,CAAC"}