"Shifter" is a simple contract that can be used to execute peg shift and depth shifts in the x/perp module of Nibiru. The contract stores a whitelist of addresses, managed by an admin. This whitelist design takes inspiration from cw-plus/contracts/cw1-whitelist.
The contract initializes with an admin address and allows the admin to add or remove addresses from the whitelist. Users can query whether an address is whitelisted or not.
- Initialize the contract with an admin address.
- Allow the admin to add or remove addresses from the whitelist.
- Allow anyone to query if an address is on the whitelist.
- Members of the whitelist set can execute permissioned calls on the Nibiru x/perp module for dynamic optimizations like peg shift and depth shift.
- InitMsg: Initializes the contract with the admin address.
- ExecuteMsg: Enum for executing msgs
- ExecuteMsg::DepthShift
- ExecuteMsg::PegShift
- ExecuteMsg::AddMember adds an address to the whitelist
- ExecuteMsg::RemoveMember removes and address from the whitelist.
- ExecuteMsg::ChangeAdmin lets the current admin set a new one.