Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Sk8erboi84 committed Oct 12, 2023
2 parents 27392e0 + d0be8d5 commit 2ca9312
Show file tree
Hide file tree
Showing 48 changed files with 1,448 additions and 330 deletions.
45 changes: 45 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,51 @@
"contributions": [
"code"
]
},
{
"login": "Tbelleng",
"name": "Tbelleng",
"avatar_url": "https://avatars.githubusercontent.com/u/117627242?v=4",
"profile": "https://github.com/Tbelleng",
"contributions": [
"code"
]
},
{
"login": "dic0de",
"name": "dic0de",
"avatar_url": "https://avatars.githubusercontent.com/u/37063500?v=4",
"profile": "https://github.com/dic0de",
"contributions": [
"code"
]
},
{
"login": "akhercha",
"name": "akhercha",
"avatar_url": "https://avatars.githubusercontent.com/u/22559023?v=4",
"profile": "https://github.com/akhercha",
"contributions": [
"code"
]
},
{
"login": "VictorONN",
"name": "VictorONN",
"avatar_url": "https://avatars.githubusercontent.com/u/73134512?v=4",
"profile": "https://github.com/VictorONN",
"contributions": [
"code"
]
},
{
"login": "kasteph",
"name": "kasteph",
"avatar_url": "https://avatars.githubusercontent.com/u/3408478?v=4",
"profile": "https://github.com/kasteph",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ftupas"><img src="https://avatars.githubusercontent.com/u/35031356?v=4?s=100" width="100px;" alt="ftupas"/><br /><sub><b>ftupas</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/satoru/commits?author=ftupas" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lambda-0x"><img src="https://avatars.githubusercontent.com/u/87354252?v=4?s=100" width="100px;" alt="lambda-0x"/><br /><sub><b>lambda-0x</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/satoru/commits?author=lambda-0x" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tbelleng"><img src="https://avatars.githubusercontent.com/u/117627242?v=4?s=100" width="100px;" alt="Tbelleng"/><br /><sub><b>Tbelleng</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/satoru/commits?author=Tbelleng" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dic0de"><img src="https://avatars.githubusercontent.com/u/37063500?v=4?s=100" width="100px;" alt="dic0de"/><br /><sub><b>dic0de</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/satoru/commits?author=dic0de" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/akhercha"><img src="https://avatars.githubusercontent.com/u/22559023?v=4?s=100" width="100px;" alt="akhercha"/><br /><sub><b>akhercha</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/satoru/commits?author=akhercha" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/VictorONN"><img src="https://avatars.githubusercontent.com/u/73134512?v=4?s=100" width="100px;" alt="VictorONN"/><br /><sub><b>VictorONN</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/satoru/commits?author=VictorONN" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kasteph"><img src="https://avatars.githubusercontent.com/u/3408478?v=4?s=100" width="100px;" alt="kasteph"/><br /><sub><b>kasteph</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/satoru/commits?author=kasteph" title="Code">💻</a></td>
</tr>
</tbody>
</table>

Expand Down
4 changes: 2 additions & 2 deletions book/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Satoru is a cutting-edge synthetics platform for Starknet, taking inspiration fr

![Satoru Whats Up](./assets/satoru-whats-up.gif)

Like it's namesake, Satoru is **powerful** and **badass**. It's also a bit of a mystery. We don't know what it's capable of yet, but we're excited to find out.
Like its namesake, Satoru is **powerful** and **badass**. It's also a bit of a mystery. We don't know what it's capable of yet, but we're excited to find out.

Combine the power of **Starknet** with it's huge computation capacity to the great design of **GMX v2**, and you get Satoru, a synthetics platform that is fast, cheap and scalable.
Combine the power of **Starknet** with its huge computation capacity with the great design of **GMX v2**, and you get Satoru, a synthetics platform that is fast, cheap and scalable.
2 changes: 1 addition & 1 deletion book/src/continuous-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

A workflow is a configurable automated process that will run one or more jobs. Workflows are defined by a YAML file checked in to your repository and will run when triggered by an event in your repository, or they can be triggered manually, or at a defined schedule.

In this section we will run through every workflows and give a detailed explanation of their functionalities.
In this section we will run through every workflow and give a detailed explanation of their functionalities.
4 changes: 2 additions & 2 deletions book/src/smart-contracts-architecture/data-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The Data Module serves as the backbone for storing and managing the protocol's d
### Smart Contracts

#### [data_store.cairo](https://github.com/keep-starknet-strange/satoru/blob/main/src/data/data_store.cairo)
The `DataStore` is the central smart contract of the module, holding the responsibility of maintaining the protocol's data. It manage different entities, including orders, positions, withdrawals, and deposits.
The `DataStore` is the central smart contract of the module, holding the responsibility of maintaining the protocol's data. It manages different entities, including orders, positions, withdrawals, and deposits.

##### Key Features & Responsibilities:
- **Order Management:** Enables the creation, reading, updating, and deletion of orders, each linked to a specific user account. Orders can be retrieved using their unique keys or can be listed per user account.
Expand All @@ -28,4 +28,4 @@ The constructor initializes the contract with a `role_store` address, establishi
### Cairo Library Files

#### [keys.cairo](https://github.com/keep-starknet-strange/satoru/blob/main/src/data/keys.cairo)
This Cairo library file plays a crucial role in generating the keys for the protocol's entries in the data store. The keys serve as unique identifiers, enabling the protocol to accurately access and manage the stored data.
This Cairo library file plays a crucial role in generating the keys for the protocol's entries in the data store. The keys serve as unique identifiers, enabling the protocol to accurately access and manage the stored data.
11 changes: 4 additions & 7 deletions scripts/bank/deploy_StrictBank_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for strict_bank.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_StrictBank.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_StrictBank.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2
starkli deploy $class_hash $3 $4 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/bank/deploy_bank_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for bank.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_Bank.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_Bank.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2
starkli deploy $class_hash $3 $4 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/config/deploy_config_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for config.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_Config.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_Config.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2 $3
starkli deploy $class_hash $3 $4 $5 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/config/deploy_timelock_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for timelock.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_Timelock.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_Timelock.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash
starkli deploy $class_hash --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/data/deploy_data_store_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for data_store.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_DataStore.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_DataStore.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1
starkli deploy $class_hash $3 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/deposit/deploy_deposit_vault_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for deposit_vault.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_DepositVault.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_DepositVault.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2
starkli deploy $class_hash $3 $4 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/event/deploy_event_emitter_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for event_emitter.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_EventEmitter.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_EventEmitter.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash
starkli deploy $class_hash --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/exchange/deploy_adl_handler_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for adl_handler.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_AdlHandler.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_AdlHandler.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2 $3 $4 $5 $6 $7 $8
starkli deploy $class_hash $3 $4 $5 $6 $7 $8 $9 $10 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/exchange/deploy_base_order_handler_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for base_order_handler.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_BaseOrderHandler.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_BaseOrderHandler.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2 $3 $4 $5 $6 $7
starkli deploy $class_hash $3 $4 $5 $6 $7 $8 $9 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/exchange/deploy_deposit_handler_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for deposit_handler.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_DepositHandler.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_DepositHandler.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2 $3 $4 $5
starkli deploy $class_hash $3 $4 $5 $6 $7 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/exchange/deploy_liquidation_handler_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for liquidation_handler.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_LiquidationHandler.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_LiquidationHandler.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2 $3 $4 $5 $6 $7
starkli deploy $class_hash $3 $4 $5 $6 $7 $8 $9 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/exchange/deploy_order_handler_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for order_handler.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_OrderHandler.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_OrderHandler.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2 $3 $4 $5 $6 $7
starkli deploy $class_hash $3 $4 $5 $6 $7 $8 $9 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/exchange/deploy_withdrawal_handler_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for withdrawal_handler.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_WithdrawalHandler.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_WithdrawalHandler.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2 $3 $4 $5
starkli deploy $class_hash $3 $4 $5 $6 $7 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/fee/deploy_fee_handler_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for fee_handler.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_FeeHandler.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_FeeHandler.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2 $3
starkli deploy $class_hash $3 $4 $5 --network=goerli-1 --account $1 --keystore $2
11 changes: 4 additions & 7 deletions scripts/market/deploy_market_factory_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Deployment script for market_factory.cairo

# Declare the contract and capture the command output
command_output=$(starkli declare ../target/dev/satoru_MarketFactory.sierra.json)
command_output=$(starkli declare ../../target/dev/satoru_MarketFactory.sierra.json --network=goerli-1 --compiler-version=2.1.0 --account $1 --keystore $2)

# Define the character to split the command output
from_char=":"

# Extract the class hash from the command output
class_hash=$(echo "$command_output" | sed 's/.*'$from_char'//')
from_string="Class hash declared:"
class_hash="${command_output#*$from_string}"

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $1 $2 $3 $4
starkli deploy $class_hash $3 $4 $5 $6 --network=goerli-1 --account $1 --keystore $2
Loading

0 comments on commit 2ca9312

Please sign in to comment.