@rootzero/contracts 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Commands.sol +16 -16
- package/Events.sol +3 -3
- package/Utils.sol +1 -1
- package/commands/Base.sol +0 -19
- package/commands/Pipe.sol +15 -10
- package/commands/Provision.sol +2 -2
- package/commands/{control → admin}/AllowAssets.sol +4 -4
- package/commands/{control → admin}/Allowance.sol +8 -8
- package/commands/{control → admin}/Authorize.sol +4 -4
- package/commands/{control → admin}/DenyAssets.sol +4 -4
- package/commands/{control → admin}/Destroy.sol +4 -4
- package/commands/{control → admin}/Execute.sol +4 -4
- package/commands/{control → admin}/Init.sol +4 -4
- package/commands/{control → admin}/Unauthorize.sol +4 -4
- package/core/Access.sol +2 -2
- package/core/Calls.sol +16 -2
- package/core/Host.sol +4 -4
- package/core/Types.sol +1 -1
- package/events/{Control.sol → Admin.sol} +5 -5
- package/events/Peer.sol +24 -0
- package/events/{RootZero.sol → Piped.sol} +3 -3
- package/package.json +1 -1
- package/peer/AllowAssets.sol +38 -0
- package/peer/Allowance.sol +35 -0
- package/peer/AssetPull.sol +43 -0
- package/peer/Base.sol +40 -0
- package/peer/DenyAssets.sol +38 -0
- package/peer/Settle.sol +32 -0
- package/queries/Assets.sol +1 -2
- package/queries/Balances.sol +1 -2
- package/queries/Positions.sol +1 -2
- package/utils/Accounts.sol +8 -0
- package/utils/Ids.sol +35 -30
- package/utils/Layout.sol +3 -3
- package/utils/Utils.sol +2 -2
- package/events/Remote.sol +0 -24
- package/remote/AllowAssets.sol +0 -39
- package/remote/Allowance.sol +0 -36
- package/remote/AssetPull.sol +0 -44
- package/remote/Base.sol +0 -40
- package/remote/DenyAssets.sol +0 -39
- package/remote/Settle.sol +0 -33
package/remote/Settle.sol
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-only
|
|
2
|
-
pragma solidity ^0.8.33;
|
|
3
|
-
|
|
4
|
-
import { RemoteBase } from "./Base.sol";
|
|
5
|
-
import { TransferHook } from "../commands/Transfer.sol";
|
|
6
|
-
import { Cursors, Cur, Schemas } from "../Cursors.sol";
|
|
7
|
-
|
|
8
|
-
using Cursors for Cur;
|
|
9
|
-
|
|
10
|
-
string constant NAME = "remoteSettle";
|
|
11
|
-
|
|
12
|
-
/// @title RemoteSettle
|
|
13
|
-
/// @notice Remote that consumes remote-supplied TRANSACTION blocks through the shared transfer hook.
|
|
14
|
-
/// Each TRANSACTION block in the request calls `transfer(value)`. Restricted to trusted remotes.
|
|
15
|
-
abstract contract RemoteSettle is RemoteBase, TransferHook {
|
|
16
|
-
uint internal immutable remoteSettleId = remoteId(NAME);
|
|
17
|
-
|
|
18
|
-
constructor() {
|
|
19
|
-
emit Remote(host, remoteSettleId, NAME, Schemas.Transaction, false);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/// @notice Execute the remote-settle call.
|
|
23
|
-
function remoteSettle(bytes calldata request) external onlyRemote returns (bytes memory) {
|
|
24
|
-
(Cur memory state, , ) = cursor(request, 1);
|
|
25
|
-
|
|
26
|
-
while (state.i < state.bound) {
|
|
27
|
-
transfer(state.unpackTxValue());
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
state.complete();
|
|
31
|
-
return "";
|
|
32
|
-
}
|
|
33
|
-
}
|