Skip to content

Commit

Permalink
Fix update config (#392)
Browse files Browse the repository at this point in the history
* enable update setting
  • Loading branch information
notV4l authored Nov 17, 2024
1 parent 561b44c commit 5bf6dac
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion manifest_mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -3060,7 +3060,7 @@
},
{
"address": "0x610212857b3970aaf82ecd3b143a79fddf3948a6c6e05937ad5c7b93556eb71",
"class_hash": "0xab105d475a61ac9c1e9f99adec8be974924c2decd4788b201f1ece4b9ec9bc",
"class_hash": "0x1359c4c178a30c144626649e3d8c005b79b55222cc46f0352cf745b40ad683c",
"abi": [
{
"type": "impl",
Expand Down
2 changes: 1 addition & 1 deletion src/systems/ryo.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ mod ryo {
new_ryo_config.paper_reward_launderer = ryo_config.paper_reward_launderer;
new_ryo_config.treasury_fee_pct = ryo_config.treasury_fee_pct;

store.save_ryo_config(@ryo_config);
store.save_ryo_config(@new_ryo_config);
}

fn set_paper(self: @ContractState, paper_address: ContractAddress) {
Expand Down
43 changes: 20 additions & 23 deletions web/src/dojo/hooks/useSystems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,30 +388,27 @@ export const useSystems = (): SystemsInterface => {
const updateRyoConfig = useCallback(
async (ryoConfig: RyoConfig) => {

// const { hash } = await executeAndReceipt({
// contractName: `ryo`,
// entrypoint: "update_ryo_config",
// calldata: CallData.compile({
// key: 0, // ignored in contract
// initialized: 1, // ignored in contract
// paused: 0, // ignored in contract
// season_version: 3, // ignored in contract
// season_duration: ryoConfig.season_duration,
// season_time_limit: ryoConfig.season_time_limit,
// paper_fee: ryoConfig.paper_fee,
// paper_reward_launderer: ryoConfig.paper_reward_launderer,
// treasury_fee_pct: ryoConfig.treasury_fee_pct,
// treasury_balance: 0, // ignored in contract
// }),
// });

// return {
// hash,
// };
const { hash } = await executeAndReceipt({
contractName: `ryo`,
entrypoint: "update_ryo_config",
calldata: CallData.compile({
key: 0, // ignored in contract
initialized: 1, // ignored in contract
paused: 0, // ignored in contract
season_version: 0, // ignored in contract
season_duration: ryoConfig.season_duration,
season_time_limit: ryoConfig.season_time_limit,
paper_fee: ryoConfig.paper_fee,
paper_reward_launderer: ryoConfig.paper_reward_launderer,
treasury_fee_pct: ryoConfig.treasury_fee_pct,
treasury_balance: 0, // ignored in contract
}),
});

return {
hash,
};

return {
hash: "0x0"
}
},
[executeAndReceipt],
);
Expand Down
4 changes: 2 additions & 2 deletions web/src/manifests/manifest_mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,7 @@
},
{
"address": "0x44a23bbfe03ffe90d3c23fb6e5a8ad0341036c039363dfa6f3513278aa51fca",
"class_hash": "0x6d4a2dc65947a9648b9657f93bad66fde5c188a23bbf8dd90620519673ebf3",
"class_hash": "0x22cb7fbd5865cfe96a9b6582eae5fa508c9af1b0563a004e881f171948dac28",
"abi": [
{
"type": "impl",
Expand Down Expand Up @@ -3060,7 +3060,7 @@
},
{
"address": "0x610212857b3970aaf82ecd3b143a79fddf3948a6c6e05937ad5c7b93556eb71",
"class_hash": "0xab105d475a61ac9c1e9f99adec8be974924c2decd4788b201f1ece4b9ec9bc",
"class_hash": "0x1359c4c178a30c144626649e3d8c005b79b55222cc46f0352cf745b40ad683c",
"abi": [
{
"type": "impl",
Expand Down

0 comments on commit 5bf6dac

Please sign in to comment.