-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Deploy your Prediction Market Agent with Safe | ||
|
||
Prediction Market Agent Tooling (PMAT) includes in-built Safe integration, allowing users to deploy and fund a Safe wallet. This wallet is used to place bets on different prediction markets securely and efficiently. By leveraging Safe wallets, users can enhance the security and transparency of their prediction market interactions. | ||
|
||
## Benefits of using a Safe Wallet | ||
- Multiple owner configuration: Enables multi-signature control for enhanced security. | ||
|
||
- Batching transactions: Allows executing multiple transactions in a single batch, reducing gas costs and improving efficiency. | ||
|
||
- Leveraging transaction sponsorships through Safe Modules: Enables external funding or fee payment by sponsors. | ||
|
||
## Steps to integerate Safe Wallet with PMAT | ||
|
||
1. Install poetry if not already isntalled | ||
``` | ||
python3.10 -m pip install poetry | ||
python3.10 -m poetry install | ||
python3.10 -m poetry shell | ||
``` | ||
|
||
2. Deploy a Safe using an EOA | ||
|
||
Make sure that the EOA has enough balance in xDAI for the transaction to go through. | ||
|
||
``` | ||
poetry run python scripts/create_safe_for_agent.py --from-private-key <YOUR_AGENT_PRIVATE_KEY> | ||
``` | ||
|
||
### Configuration Options | ||
|
||
| Option | Type | Default | Description | | ||
|----------------------|---------|----------|-------------| | ||
| `--from-private-key` | String | Required | The private key of the agent deploying the Safe | | ||
| `--rpc-url` | String | Optional | Custom RPC URL for deployment | | ||
| `--salt-nonce` | Integer | Optional | Salt nonce for deterministic Safe deployment | | ||
| `--fund-safe` | Flag | Optional | Whether to fund the Safe upon creation | | ||
| `--fund-amount-xdai` | Integer | Optional (Default: 1) | Amount of xDAI to fund the Safe with (if `--fund-safe` is enabled) | | ||
|
||
3. The abover step will print our the Safe wallet address. Put that address in the **SAFE_ADDRESS** env variable. Also make sure to put the Safe's owners private key in the **BET_FROM_PRIVATE_KEY** env variable. | ||
|
||
|
||
If the above two env varibles are configured correctly, all agents by default will start using the Safe address to transact and place bets on the prediction markets. | ||
|
||
Always make sure to have enough balace in your safe wallet for your agent to transact seamlessly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
site_name: Prediction Market Agent Tooling | ||
nav: | ||
- Home: index.md | ||
- Prediction Markets: predictionmarkets.md | ||
- Dependencies: dependencies.md | ||
- Quickstart: quickstart.md | ||
- DeployableTraderAgent: deployabletraderagent.md | ||
- ExampleAgent: exampleagent.md | ||
- Prediction Market Agnets: | ||
- Overview: predictionmarkets.md | ||
- Dependencies: dependencies.md | ||
- Quickstart: quickstart.md | ||
- Agent Development: | ||
- Deployable Trader Agent: deployabletraderagent.md | ||
- Example Agent: exampleagent.md | ||
- Deploy with Safe: deploywithsafe.md | ||
- Contributing: contributing.md | ||
|
||
theme: | ||
name: material | ||
|