-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement requested changes (owners)
- Loading branch information
Showing
20 changed files
with
351 additions
and
229 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
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
pages/reference-smart-account/owner-events/ChangedThreshold.mdx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
pages/reference-smart-account/owner-functions/addOwnerWithThreshold.mdx
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
pages/reference-smart-account/owner-functions/changeThreshold.mdx
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
pages/reference-smart-account/owner-functions/getOwners.mdx
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
pages/reference-smart-account/owner-functions/getThreshold.mdx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
pages/reference-smart-account/owner-functions/removeOwner.mdx
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
pages/reference-smart-account/owner-functions/swapOwner.mdx
This file was deleted.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
...-smart-account/owner-functions/_meta.json → ...reference-smart-account/owners/_meta.json
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,9 +1,9 @@ | ||
{ | ||
"addOwnerWithThreshold": "addOwnerWithThreshold", | ||
"removeOwner": "removeOwner", | ||
"swapOwner": "swapOwner", | ||
"changeThreshold": "changeThreshold", | ||
"isOwner": "isOwner", | ||
"getThreshold": "getThreshold", | ||
"getOwners": "getOwners", | ||
"getThreshold": "getThreshold" | ||
"isOwner": "isOwner", | ||
"removeOwner": "removeOwner", | ||
"swapOwner": "swapOwner" | ||
} |
75 changes: 75 additions & 0 deletions
75
pages/reference-smart-account/owners/addOwnerWithThreshold.mdx
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,75 @@ | ||
import { Tabs, Callout } from "nextra/components" | ||
|
||
# `addOwnerWithThreshold` | ||
|
||
Adds the owner `owner` to the Safe and updates the threshold to `_threshold`. | ||
|
||
<Callout type="warning"> | ||
This can only be done via a Safe transaction. | ||
</Callout> | ||
|
||
## Usage | ||
|
||
{/* <!-- vale off --> */} | ||
|
||
<Tabs items={['example.sol']}> | ||
<Tabs.Tab> | ||
```solidity | ||
interface ISafe { | ||
function addOwnerWithThreshold(address owner, uint256 _threshold) external | ||
} | ||
contract Example { | ||
function example() … { | ||
(ISafe safe).addOwnerWithThreshold( | ||
"0x...", | ||
1 | ||
) | ||
} | ||
} | ||
``` | ||
</Tabs.Tab> | ||
</Tabs> | ||
|
||
{/* <!-- vale on --> */} | ||
|
||
## Parameters | ||
|
||
### `owner` | ||
|
||
- **Type:** `address` | ||
|
||
New owner address. | ||
|
||
```solidity focus=2 | ||
addOwnerWithThreshold( | ||
"0x...", | ||
1 | ||
) | ||
``` | ||
|
||
### `_threshold` | ||
|
||
- **Type:** `uint256` | ||
|
||
New threshold. | ||
|
||
```solidity focus=3 | ||
addOwnerWithThreshold( | ||
"0x...", | ||
1 | ||
) | ||
``` | ||
|
||
## Events | ||
|
||
### `AddedOwner` | ||
|
||
```solidity | ||
event AddedOwner(address owner) | ||
``` | ||
|
||
Emitted when an owner is added to the Safe. | ||
|
||
This event is also emitted in the [`swapOwner`](./swapOwner.mdx) function. |
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,51 @@ | ||
import { Tabs, Callout } from "nextra/components" | ||
|
||
# `changeThreshold` | ||
|
||
Changes the threshold of the Safe to `_threshold`. | ||
|
||
<Callout type="warning"> | ||
This can only be done via a Safe transaction. | ||
</Callout> | ||
|
||
## Usage | ||
|
||
{/* <!-- vale off --> */} | ||
|
||
<Tabs items={['example.sol']}> | ||
<Tabs.Tab> | ||
```solidity | ||
interface ISafe { | ||
function changeThreshold(uint256 _threshold) external | ||
} | ||
``` | ||
</Tabs.Tab> | ||
</Tabs> | ||
|
||
{/* <!-- vale on --> */} | ||
|
||
## Parameters | ||
|
||
### `_threshold` | ||
- **Type:** `uint256` | ||
|
||
New threshold. | ||
|
||
```solidity focus=2 | ||
changeThreshold( | ||
1 | ||
) | ||
``` | ||
|
||
## Events | ||
|
||
### `ChangedThreshold` | ||
|
||
```solidity | ||
event ChangedThreshold(uint256 threshold) | ||
``` | ||
|
||
Emitted when the threshold for confirmations is changed. | ||
|
||
This event is also emitted in the [`addOwnerWithThreshold`](./addOwnerWithThreshold.mdx) and [`removeOwner`](./removeOwner.mdx) functions. |
Oops, something went wrong.