We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Satoru version:
6ebc1a4
Current behavior:
ReentrancyGuard: reentrant call when create_order, cancel_order, simulate_execute_order, create_deposit, cancel_deposit, simulate_execute_deposit, create_withdrawal, cancel_withdrawal, simulate_execute_withdrawal. Duplicate reentrancy in ExchangeRouter and [*]Handler
ReentrancyGuard: reentrant call
Expected behavior:
User can request create and cancel order, deposit and withdrawal via ExchangeRouter contract
Steps to reproduce: const createDepositCalldata: Call[] = [ { contractAddress: depositParams.initial_long_token_address, entrypoint: "approve", calldata: [ contractAddresses.Router, depositParams.initial_long_token_amount.toString(), "0" ] }, { contractAddress: depositParams.initial_short_token_address, entrypoint: "approve", calldata: CallData.compile({ spender: contractAddresses.Router, amount: uint256.UINT_128_MAX, value: 0 }) }, { contractAddress: contractAddresses.ExchangeRouter, entrypoint: "send_tokens", calldata: [ depositParams.initial_long_token_address, contractAddresses.DepositVault, depositParams.initial_long_token_amount.toString() ] }, { contractAddress: contractAddresses.ExchangeRouter, entrypoint: "send_tokens", calldata: [ depositParams.initial_short_token_address, contractAddresses.DepositVault, BigInt(depositParams.initial_short_token_amount), ], }, { contractAddress: contractAddresses.DepositHandler, entrypoint: "create_deposit", calldata: [ account.address, depositParams.receiver, depositParams.callback_contract, depositParams.ui_fee_receiver, depositParams.market_token_address, depositParams.initial_long_token_address, depositParams.initial_short_token_address, depositParams.long_token_swap_path, depositParams.short_token_swap_path, depositParams.min_market_tokens.toString(), depositParams.execution_fee.toString(), depositParams.callback_gas_limit.toString() ] } ]; const account = new Account(provider, senderAddress, privateKey); const tx = await account.execute(createDepositCalldata);
Related code:
Other information:
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug Report
Satoru version:
6ebc1a4
Current behavior:
ReentrancyGuard: reentrant call
when create_order, cancel_order, simulate_execute_order, create_deposit, cancel_deposit, simulate_execute_deposit, create_withdrawal, cancel_withdrawal, simulate_execute_withdrawal.Duplicate reentrancy in ExchangeRouter and [*]Handler
Expected behavior:
User can request create and cancel order, deposit and withdrawal via ExchangeRouter contract
Steps to reproduce:
const createDepositCalldata: Call[] = [
{
contractAddress: depositParams.initial_long_token_address,
entrypoint: "approve",
calldata: [
contractAddresses.Router,
depositParams.initial_long_token_amount.toString(),
"0"
]
},
{
contractAddress: depositParams.initial_short_token_address,
entrypoint: "approve",
calldata: CallData.compile({
spender: contractAddresses.Router,
amount: uint256.UINT_128_MAX,
value: 0
})
},
{
contractAddress: contractAddresses.ExchangeRouter,
entrypoint: "send_tokens",
calldata: [
depositParams.initial_long_token_address,
contractAddresses.DepositVault,
depositParams.initial_long_token_amount.toString()
]
},
{
contractAddress: contractAddresses.ExchangeRouter,
entrypoint: "send_tokens",
calldata: [
depositParams.initial_short_token_address,
contractAddresses.DepositVault,
BigInt(depositParams.initial_short_token_amount),
],
},
{
contractAddress: contractAddresses.DepositHandler,
entrypoint: "create_deposit",
calldata: [
account.address,
depositParams.receiver,
depositParams.callback_contract,
depositParams.ui_fee_receiver,
depositParams.market_token_address,
depositParams.initial_long_token_address,
depositParams.initial_short_token_address,
depositParams.long_token_swap_path,
depositParams.short_token_swap_path,
depositParams.min_market_tokens.toString(),
depositParams.execution_fee.toString(),
depositParams.callback_gas_limit.toString()
]
}
];
const account = new Account(provider, senderAddress, privateKey);
const tx = await account.execute(createDepositCalldata);
Related code:
Other information:
The text was updated successfully, but these errors were encountered: