@agoric/pegasus 0.7.12 → 0.7.13-calypso-dev-dabccdc.0
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/package.json +32 -25
- package/src/contract.js +37 -0
- package/src/courier.js +17 -8
- package/src/ibc-trace.js +1 -1
- package/src/ics20.js +16 -5
- package/src/pegasus.js +30 -39
- package/src/proposals/core-proposal.js +15 -8
- package/src/types.js +14 -4
- package/CHANGELOG.md +0 -442
- package/exported.js +0 -5
- package/scripts/build-bundles.js +0 -9
- package/scripts/init-core.js +0 -20
package/package.json
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/pegasus",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.13-calypso-dev-dabccdc.0+dabccdc",
|
|
4
4
|
"description": "Peg-as-us contract",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/pegasus.js",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": "
|
|
8
|
+
"node": "^18.12 || ^20.9"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "
|
|
12
|
-
"build:bundles": "node scripts/build-bundles.js",
|
|
11
|
+
"build": "exit 0",
|
|
13
12
|
"test": "ava",
|
|
14
13
|
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
|
|
15
14
|
"test:xs": "exit 0",
|
|
16
15
|
"lint-fix": "yarn lint:eslint --fix",
|
|
17
16
|
"lint": "run-s --continue-on-error lint:*",
|
|
18
17
|
"lint:eslint": "eslint .",
|
|
19
|
-
"lint:types": "tsc
|
|
18
|
+
"lint:types": "tsc"
|
|
20
19
|
},
|
|
21
20
|
"repository": {
|
|
22
21
|
"type": "git",
|
|
@@ -29,41 +28,49 @@
|
|
|
29
28
|
},
|
|
30
29
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
31
30
|
"dependencies": {
|
|
32
|
-
"@agoric/assert": "
|
|
33
|
-
"@agoric/ertp": "
|
|
34
|
-
"@agoric/internal": "
|
|
35
|
-
"@agoric/
|
|
36
|
-
"@agoric/
|
|
37
|
-
"@agoric/
|
|
38
|
-
"@agoric/
|
|
39
|
-
"@agoric/
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@endo/
|
|
44
|
-
"@endo/
|
|
45
|
-
"@endo/
|
|
31
|
+
"@agoric/assert": "0.6.1-calypso-dev-dabccdc.0+dabccdc",
|
|
32
|
+
"@agoric/ertp": "0.16.3-calypso-dev-dabccdc.0+dabccdc",
|
|
33
|
+
"@agoric/internal": "0.3.3-calypso-dev-dabccdc.0+dabccdc",
|
|
34
|
+
"@agoric/network": "0.1.1-calypso-dev-dabccdc.0+dabccdc",
|
|
35
|
+
"@agoric/notifier": "0.6.3-calypso-dev-dabccdc.0+dabccdc",
|
|
36
|
+
"@agoric/store": "0.9.3-calypso-dev-dabccdc.0+dabccdc",
|
|
37
|
+
"@agoric/swingset-vat": "0.32.3-calypso-dev-dabccdc.0+dabccdc",
|
|
38
|
+
"@agoric/vats": "0.15.2-calypso-dev-dabccdc.0+dabccdc",
|
|
39
|
+
"@agoric/vow": "0.1.1-calypso-dev-dabccdc.0+dabccdc",
|
|
40
|
+
"@agoric/zoe": "0.26.3-calypso-dev-dabccdc.0+dabccdc",
|
|
41
|
+
"@agoric/zone": "0.2.3-calypso-dev-dabccdc.0+dabccdc",
|
|
42
|
+
"@endo/bundle-source": "^3.2.3",
|
|
43
|
+
"@endo/captp": "^4.2.0",
|
|
44
|
+
"@endo/far": "^1.1.2",
|
|
45
|
+
"@endo/init": "^1.1.2",
|
|
46
|
+
"@endo/nat": "^5.0.7",
|
|
47
|
+
"@endo/promise-kit": "^1.1.2"
|
|
46
48
|
},
|
|
47
49
|
"devDependencies": {
|
|
48
|
-
"@agoric/
|
|
49
|
-
"ava": "^5.
|
|
50
|
-
"c8": "^
|
|
50
|
+
"@agoric/vat-data": "0.5.3-calypso-dev-dabccdc.0+dabccdc",
|
|
51
|
+
"ava": "^5.3.0",
|
|
52
|
+
"c8": "^9.1.0",
|
|
51
53
|
"import-meta-resolve": "^2.2.1"
|
|
52
54
|
},
|
|
53
55
|
"files": [
|
|
54
56
|
"scripts/",
|
|
55
57
|
"src/",
|
|
56
|
-
"exported.js",
|
|
57
58
|
"NEWS.md"
|
|
58
59
|
],
|
|
59
60
|
"ava": {
|
|
60
61
|
"files": [
|
|
61
|
-
"test
|
|
62
|
+
"test/**/*.test.*"
|
|
63
|
+
],
|
|
64
|
+
"require": [
|
|
65
|
+
"@endo/init/debug.js"
|
|
62
66
|
],
|
|
63
67
|
"timeout": "10m"
|
|
64
68
|
},
|
|
65
69
|
"publishConfig": {
|
|
66
70
|
"access": "public"
|
|
67
71
|
},
|
|
68
|
-
"
|
|
72
|
+
"typeCoverage": {
|
|
73
|
+
"atLeast": 90.6
|
|
74
|
+
},
|
|
75
|
+
"gitHead": "dabccdcdabd3793ecae0a2b8b955c9c34150f12f"
|
|
69
76
|
}
|
package/src/contract.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { prepareVowTools } from '@agoric/vow/vat.js';
|
|
3
|
+
import { makeDurableZone } from '@agoric/zone/durable.js';
|
|
4
|
+
import { makePegasus } from './pegasus.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @import {Remote} from '@agoric/vow';
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @type {ContractStartFn<import('./pegasus.js').Pegasus, never, {}, {
|
|
12
|
+
* board: Remote<BoardDepositFacet>,
|
|
13
|
+
* namesByAddress: Remote<import('@agoric/vats').NameHub>
|
|
14
|
+
* }>}
|
|
15
|
+
*/
|
|
16
|
+
export const start = (zcf, privateArgs, baggage) => {
|
|
17
|
+
const zone = makeDurableZone(baggage);
|
|
18
|
+
|
|
19
|
+
const whenZone = zone.subZone('when');
|
|
20
|
+
const { when } = prepareVowTools(whenZone);
|
|
21
|
+
|
|
22
|
+
const { board, namesByAddress } = privateArgs;
|
|
23
|
+
|
|
24
|
+
// start requires that the object passed in must be durable. Given that we
|
|
25
|
+
// haven't made pegasus durable yet, we'll wrap its non-durable methods within
|
|
26
|
+
// an exo object to workaround this requirement.
|
|
27
|
+
// @ts-expect-error makePegasus returns a remotable object
|
|
28
|
+
const publicFacet = zone.exo('PublicFacet', undefined, {
|
|
29
|
+
...makePegasus({ zcf, board, namesByAddress, when }),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// @ts-expect-error XXX durable wrapping non-durable
|
|
33
|
+
return harden({
|
|
34
|
+
publicFacet,
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
harden(start);
|
package/src/courier.js
CHANGED
|
@@ -6,6 +6,12 @@ import { WalletName } from '@agoric/internal';
|
|
|
6
6
|
import { E, Far } from '@endo/far';
|
|
7
7
|
import { makeOncePromiseKit } from './once-promise-kit.js';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @import {DepositFacet} from '@agoric/ertp/src/types.js'
|
|
11
|
+
* @import {Connection} from '@agoric/network';
|
|
12
|
+
* @import {Remote} from '@agoric/vow';
|
|
13
|
+
*/
|
|
14
|
+
|
|
9
15
|
/**
|
|
10
16
|
* Create or return an existing courier promise kit.
|
|
11
17
|
*
|
|
@@ -29,18 +35,19 @@ export const getCourierPK = (key, keyToCourierPK) => {
|
|
|
29
35
|
/**
|
|
30
36
|
* Create the [send, receive] pair.
|
|
31
37
|
*
|
|
32
|
-
* @
|
|
38
|
+
* @import {NameHub} from '@agoric/vats'
|
|
33
39
|
*
|
|
34
40
|
* @typedef {object} CourierArgs
|
|
35
41
|
* @property {ZCF} zcf
|
|
36
|
-
* @property {
|
|
37
|
-
* @property {
|
|
42
|
+
* @property {Remote<BoardDepositFacet>} board
|
|
43
|
+
* @property {Remote<NameHub>} namesByAddress
|
|
38
44
|
* @property {Denom} sendDenom
|
|
39
45
|
* @property {Brand} localBrand
|
|
40
46
|
* @property {(zcfSeat: ZCFSeat, amounts: AmountKeywordRecord) => void} retain
|
|
41
47
|
* @property {(zcfSeat: ZCFSeat, amounts: AmountKeywordRecord) => void} redeem
|
|
42
|
-
* @property {
|
|
43
|
-
* @
|
|
48
|
+
* @property {Remote<TransferProtocol>} transferProtocol
|
|
49
|
+
* @property {ReturnType<import('@agoric/vow').prepareVowTools>['when']} when
|
|
50
|
+
* @param {Remote<Connection>} connection
|
|
44
51
|
* @returns {(args: CourierArgs) => Courier}
|
|
45
52
|
*/
|
|
46
53
|
export const makeCourierMaker =
|
|
@@ -54,23 +61,25 @@ export const makeCourierMaker =
|
|
|
54
61
|
retain,
|
|
55
62
|
redeem,
|
|
56
63
|
transferProtocol,
|
|
64
|
+
when,
|
|
57
65
|
}) => {
|
|
58
66
|
/** @type {Sender} */
|
|
59
|
-
const send = async (zcfSeat, depositAddress) => {
|
|
67
|
+
const send = async (zcfSeat, depositAddress, memo, opts) => {
|
|
60
68
|
const tryToSend = async () => {
|
|
61
69
|
const amount = zcfSeat.getAmountAllocated('Transfer', localBrand);
|
|
62
70
|
const transferPacket = await E(transferProtocol).makeTransferPacket({
|
|
63
71
|
value: amount.value,
|
|
64
72
|
remoteDenom: sendDenom,
|
|
65
73
|
depositAddress,
|
|
74
|
+
memo,
|
|
75
|
+
opts,
|
|
66
76
|
});
|
|
67
77
|
|
|
68
78
|
// Retain the payment. We must not proceed on failure.
|
|
69
79
|
retain(zcfSeat, { Transfer: amount });
|
|
70
80
|
|
|
71
81
|
// The payment is already escrowed, and proposed to retain, so try sending.
|
|
72
|
-
return E(connection)
|
|
73
|
-
.send(transferPacket)
|
|
82
|
+
return when(E(connection).send(transferPacket))
|
|
74
83
|
.then(ack => E(transferProtocol).assertTransferPacketAck(ack))
|
|
75
84
|
.then(
|
|
76
85
|
_ => zcfSeat.exit(),
|
package/src/ibc-trace.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Far } from '@endo/far';
|
|
3
3
|
import { Fail } from '@agoric/assert';
|
|
4
4
|
|
|
5
|
-
import { parse } from '@agoric/
|
|
5
|
+
import { parse } from '@agoric/network';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Return a source-prefixed version of the denomination, as specified in
|
package/src/ics20.js
CHANGED
|
@@ -10,15 +10,15 @@ import { assert, details as X, Fail } from '@agoric/assert';
|
|
|
10
10
|
* @property {Denom} denom The denomination of the amount
|
|
11
11
|
* @property {string} sender The sender address
|
|
12
12
|
* @property {DepositAddress} receiver The receiver deposit address
|
|
13
|
+
* @property {string} memo The packet memo
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
// As specified in ICS20, the success result is a base64-encoded '\0x1' byte.
|
|
16
17
|
const ICS20_TRANSFER_SUCCESS_RESULT = 'AQ==';
|
|
17
18
|
|
|
18
19
|
// ibc-go as late as v3 requires the `sender` to be nonempty, but doesn't
|
|
19
|
-
// actually use it on the receiving side.
|
|
20
|
-
|
|
21
|
-
export const DUMMY_SENDER_ADDRESS = 'pegasus';
|
|
20
|
+
// actually use it on the receiving side.
|
|
21
|
+
export const DEFAULT_SENDER_ADDRESS = 'pegasus';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @param {string} s
|
|
@@ -50,10 +50,16 @@ const safeJSONParseObject = s => {
|
|
|
50
50
|
*/
|
|
51
51
|
export const parseICS20TransferPacket = async packet => {
|
|
52
52
|
const ics20Packet = safeJSONParseObject(packet);
|
|
53
|
-
const { amount, denom, receiver } = ics20Packet;
|
|
53
|
+
const { amount, denom, receiver, memo, opts } = ics20Packet;
|
|
54
54
|
|
|
55
55
|
assert.typeof(denom, 'string', X`Denom ${denom} must be a string`);
|
|
56
56
|
assert.typeof(receiver, 'string', X`Receiver ${receiver} must be a string`);
|
|
57
|
+
memo === undefined ||
|
|
58
|
+
assert.typeof(
|
|
59
|
+
memo,
|
|
60
|
+
'string',
|
|
61
|
+
X`Memo ${memo} must be a string or 'undefined'`,
|
|
62
|
+
);
|
|
57
63
|
|
|
58
64
|
// amount is a string in JSON.
|
|
59
65
|
assert.typeof(amount, 'string', X`Amount ${amount} must be a string`);
|
|
@@ -66,6 +72,8 @@ export const parseICS20TransferPacket = async packet => {
|
|
|
66
72
|
depositAddress: receiver,
|
|
67
73
|
remoteDenom: denom,
|
|
68
74
|
value,
|
|
75
|
+
memo,
|
|
76
|
+
opts,
|
|
69
77
|
});
|
|
70
78
|
};
|
|
71
79
|
|
|
@@ -80,6 +88,8 @@ export const makeICS20TransferPacket = async ({
|
|
|
80
88
|
value,
|
|
81
89
|
remoteDenom,
|
|
82
90
|
depositAddress,
|
|
91
|
+
memo,
|
|
92
|
+
opts: { sender = DEFAULT_SENDER_ADDRESS },
|
|
83
93
|
}) => {
|
|
84
94
|
// We're using Nat as a dynamic check for overflow.
|
|
85
95
|
const stringValue = String(Nat(value));
|
|
@@ -90,7 +100,8 @@ export const makeICS20TransferPacket = async ({
|
|
|
90
100
|
amount: stringValue,
|
|
91
101
|
denom: remoteDenom,
|
|
92
102
|
receiver: depositAddress,
|
|
93
|
-
sender
|
|
103
|
+
sender,
|
|
104
|
+
memo,
|
|
94
105
|
};
|
|
95
106
|
|
|
96
107
|
return JSON.stringify(ics20);
|
package/src/pegasus.js
CHANGED
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
} from '@agoric/zoe/src/contractSupport/index.js';
|
|
10
10
|
import { makeSubscriptionKit } from '@agoric/notifier';
|
|
11
11
|
|
|
12
|
-
import '@agoric/vats/exported.js';
|
|
13
|
-
import '@agoric/swingset-vat/src/vats/network/types.js';
|
|
14
|
-
import '@agoric/zoe/exported.js';
|
|
15
|
-
|
|
16
|
-
import '../exported.js';
|
|
17
12
|
import { IBCSourceTraceDenomTransformer } from './ibc-trace.js';
|
|
18
13
|
import { ICS20TransferProtocol } from './ics20.js';
|
|
19
14
|
import { makeCourierMaker, getCourierPK } from './courier.js';
|
|
20
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @import {CloseReason, Connection} from '@agoric/network';
|
|
18
|
+
* @import {Remote} from '@agoric/vow';
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
21
|
const DEFAULT_DENOM_TRANSFORMER = IBCSourceTraceDenomTransformer;
|
|
22
22
|
const DEFAULT_TRANSFER_PROTOCOL = ICS20TransferProtocol;
|
|
23
23
|
|
|
@@ -30,13 +30,15 @@ const TRANSFER_PROPOSAL_SHAPE = {
|
|
|
30
30
|
/**
|
|
31
31
|
* Make a Pegasus public API.
|
|
32
32
|
*
|
|
33
|
-
* @param {
|
|
34
|
-
* @param {
|
|
35
|
-
* @param {
|
|
33
|
+
* @param {object} powers
|
|
34
|
+
* @param {ZCF} powers.zcf the Zoe Contract Facet
|
|
35
|
+
* @param {Remote<BoardDepositFacet>} powers.board where to find depositFacets by boardID
|
|
36
|
+
* @param {Remote<NameHub>} powers.namesByAddress where to find depositFacets by bech32
|
|
37
|
+
* @param {ReturnType<import('@agoric/vow').prepareVowTools>['when']} powers.when
|
|
36
38
|
*
|
|
37
|
-
* @
|
|
39
|
+
* @import {NameHub} from '@agoric/vats'
|
|
38
40
|
*/
|
|
39
|
-
const makePegasus = (zcf, board, namesByAddress) => {
|
|
41
|
+
export const makePegasus = ({ zcf, board, namesByAddress, when }) => {
|
|
40
42
|
/**
|
|
41
43
|
* @typedef {object} LocalDenomState
|
|
42
44
|
* @property {string} localAddr
|
|
@@ -61,7 +63,7 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
|
-
* @type {LegacyWeakMap<Peg
|
|
66
|
+
* @type {LegacyWeakMap<Remote<Peg>, LocalDenomState>}
|
|
65
67
|
*/
|
|
66
68
|
// Legacy because Mappings mix functions and data
|
|
67
69
|
const pegToDenomState = makeLegacyWeakMap('Peg');
|
|
@@ -104,8 +106,8 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
104
106
|
* @param {object} param0
|
|
105
107
|
* @param {ReturnType<typeof makeCourierMaker>} param0.makeCourier
|
|
106
108
|
* @param {LocalDenomState} param0.localDenomState
|
|
107
|
-
* @param {
|
|
108
|
-
* @param {
|
|
109
|
+
* @param {Remote<TransferProtocol>} param0.transferProtocol
|
|
110
|
+
* @param {Remote<DenomTransformer>} param0.denomTransformer
|
|
109
111
|
* @returns {PegasusConnectionActions}
|
|
110
112
|
*/
|
|
111
113
|
const makePegasusConnectionActions = ({
|
|
@@ -191,6 +193,7 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
191
193
|
zcfMint.mintGains(harden(amounts), zcfSeat);
|
|
192
194
|
},
|
|
193
195
|
transferProtocol,
|
|
196
|
+
when,
|
|
194
197
|
});
|
|
195
198
|
|
|
196
199
|
const courierPK = getCourierPK(receiveDenom, receiveDenomToCourierPK);
|
|
@@ -283,6 +286,7 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
283
286
|
transferSeat,
|
|
284
287
|
),
|
|
285
288
|
transferProtocol,
|
|
289
|
+
when,
|
|
286
290
|
});
|
|
287
291
|
|
|
288
292
|
const { receiveDenomToCourierPK } = localDenomState;
|
|
@@ -304,9 +308,9 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
304
308
|
checkAbort = () => {
|
|
305
309
|
throw reason;
|
|
306
310
|
};
|
|
307
|
-
|
|
311
|
+
for (const peg of pegs) {
|
|
308
312
|
pegToDenomState.delete(peg);
|
|
309
|
-
}
|
|
313
|
+
}
|
|
310
314
|
},
|
|
311
315
|
});
|
|
312
316
|
return pegasusConnectionActions;
|
|
@@ -316,8 +320,8 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
316
320
|
/**
|
|
317
321
|
* Return a handler that can be used with the Network API.
|
|
318
322
|
*
|
|
319
|
-
* @param {
|
|
320
|
-
* @param {
|
|
323
|
+
* @param {Remote<TransferProtocol>} [transferProtocol]
|
|
324
|
+
* @param {Remote<DenomTransformer>} [denomTransformer]
|
|
321
325
|
* @returns {PegasusConnectionKit}
|
|
322
326
|
*/
|
|
323
327
|
makePegasusConnectionKit(
|
|
@@ -325,7 +329,7 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
325
329
|
denomTransformer = DEFAULT_DENOM_TRANSFORMER,
|
|
326
330
|
) {
|
|
327
331
|
/**
|
|
328
|
-
* @type {LegacyWeakMap<Connection
|
|
332
|
+
* @type {LegacyWeakMap<Remote<Connection>, LocalDenomState>}
|
|
329
333
|
*/
|
|
330
334
|
// Legacy because the value contains a JS Set
|
|
331
335
|
const connectionToLocalDenomState = makeLegacyWeakMap('Connection');
|
|
@@ -385,9 +389,8 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
385
389
|
async onReceive(c, packetBytes) {
|
|
386
390
|
const doReceive = async () => {
|
|
387
391
|
// Dispatch the packet to the appropriate Peg for this connection.
|
|
388
|
-
const parts =
|
|
389
|
-
packetBytes
|
|
390
|
-
);
|
|
392
|
+
const parts =
|
|
393
|
+
await E(transferProtocol).parseTransferPacket(packetBytes);
|
|
391
394
|
|
|
392
395
|
const { remoteDenom: receiveDenom } = parts;
|
|
393
396
|
assert.typeof(receiveDenom, 'string');
|
|
@@ -456,11 +459,13 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
456
459
|
/**
|
|
457
460
|
* Create a Zoe invitation to transfer assets over network to a deposit address.
|
|
458
461
|
*
|
|
459
|
-
* @param {
|
|
462
|
+
* @param {Remote<Peg>} pegP the peg over which to transfer
|
|
460
463
|
* @param {DepositAddress} depositAddress the remote receiver's address
|
|
464
|
+
* @param {string} [memo] the memo to attach to ics transfer packet
|
|
465
|
+
* @param {SenderOptions} [opts] additional sender options
|
|
461
466
|
* @returns {Promise<Invitation>} to transfer, make an offer of { give: { Transfer: pegAmount } } to this invitation
|
|
462
467
|
*/
|
|
463
|
-
async makeInvitationToTransfer(pegP, depositAddress) {
|
|
468
|
+
async makeInvitationToTransfer(pegP, depositAddress, memo = '', opts = {}) {
|
|
464
469
|
// Verify the peg.
|
|
465
470
|
const peg = await pegP;
|
|
466
471
|
const denomState = pegToDenomState.get(peg);
|
|
@@ -482,29 +487,15 @@ const makePegasus = (zcf, board, namesByAddress) => {
|
|
|
482
487
|
*/
|
|
483
488
|
const offerHandler = zcfSeat => {
|
|
484
489
|
assertProposalShape(zcfSeat, TRANSFER_PROPOSAL_SHAPE);
|
|
485
|
-
send(zcfSeat, depositAddress);
|
|
490
|
+
send(zcfSeat, depositAddress, memo, opts);
|
|
486
491
|
};
|
|
487
492
|
|
|
488
493
|
return zcf.makeInvitation(offerHandler, `pegasus ${sendDenom} transfer`);
|
|
489
494
|
},
|
|
490
495
|
});
|
|
491
496
|
};
|
|
497
|
+
harden(makePegasus);
|
|
492
498
|
|
|
493
499
|
/**
|
|
494
500
|
* @typedef {ReturnType<typeof makePegasus>} Pegasus
|
|
495
501
|
*/
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* @param {ZCF<{board: ERef<BoardDepositFacet>, namesByAddress: ERef<import('@agoric/vats').NameHub>}>} zcf
|
|
499
|
-
*/
|
|
500
|
-
const start = zcf => {
|
|
501
|
-
const { board, namesByAddress } = zcf.getTerms();
|
|
502
|
-
|
|
503
|
-
return {
|
|
504
|
-
publicFacet: makePegasus(zcf, board, namesByAddress),
|
|
505
|
-
};
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
harden(start);
|
|
509
|
-
harden(makePegasus);
|
|
510
|
-
export { start, makePegasus };
|
|
@@ -3,6 +3,10 @@ import { E, Far } from '@endo/far';
|
|
|
3
3
|
import { makeNameHubKit } from '@agoric/vats/src/nameHub.js';
|
|
4
4
|
import { observeIteration, subscribeEach } from '@agoric/notifier';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @import {Connection, Port, PortAllocator} from '@agoric/network';
|
|
8
|
+
*/
|
|
9
|
+
|
|
6
10
|
export const CONTRACT_NAME = 'Pegasus';
|
|
7
11
|
|
|
8
12
|
const t = 'pegasus';
|
|
@@ -19,7 +23,7 @@ export const getManifestForPegasus = ({ restoreRef }, { pegasusRef }) => ({
|
|
|
19
23
|
},
|
|
20
24
|
},
|
|
21
25
|
listenPegasus: {
|
|
22
|
-
consume: {
|
|
26
|
+
consume: { portAllocator: t, pegasusConnectionsAdmin: t, zoe: t },
|
|
23
27
|
produce: { pegasusConnections: t, pegasusConnectionsAdmin: t },
|
|
24
28
|
instance: {
|
|
25
29
|
consume: { [CONTRACT_NAME]: t },
|
|
@@ -41,12 +45,13 @@ export const startPegasus = async ({
|
|
|
41
45
|
},
|
|
42
46
|
}) => {
|
|
43
47
|
const [board, namesByAddress] = await Promise.all([boardP, namesByAddressP]);
|
|
44
|
-
const
|
|
48
|
+
const privates = { board, namesByAddress };
|
|
45
49
|
|
|
46
50
|
const { instance } = await E(zoe).startInstance(
|
|
47
51
|
pegasusInstall,
|
|
48
52
|
undefined,
|
|
49
|
-
|
|
53
|
+
undefined,
|
|
54
|
+
privates,
|
|
50
55
|
);
|
|
51
56
|
|
|
52
57
|
produceInstance.resolve(instance);
|
|
@@ -69,13 +74,15 @@ export const addPegasusTransferPort = async (
|
|
|
69
74
|
const { localAddr, actions } = connectionState;
|
|
70
75
|
if (actions) {
|
|
71
76
|
// We're open and ready for business.
|
|
72
|
-
pegasusConnectionsAdmin.update(localAddr, connectionState);
|
|
77
|
+
void E(pegasusConnectionsAdmin).update(localAddr, connectionState);
|
|
73
78
|
} else {
|
|
74
79
|
// We're closed.
|
|
75
|
-
pegasusConnectionsAdmin.delete(localAddr);
|
|
80
|
+
void E(pegasusConnectionsAdmin).delete(localAddr);
|
|
76
81
|
}
|
|
77
82
|
},
|
|
78
|
-
})
|
|
83
|
+
}).catch(err =>
|
|
84
|
+
console.error('Error observing Pegasus connection kit:', err),
|
|
85
|
+
);
|
|
79
86
|
return E(port).addListener(
|
|
80
87
|
Far('listener', {
|
|
81
88
|
async onAccept(_port, _localAddr, _remoteAddr, _listenHandler) {
|
|
@@ -90,7 +97,7 @@ export const addPegasusTransferPort = async (
|
|
|
90
97
|
harden(addPegasusTransferPort);
|
|
91
98
|
|
|
92
99
|
export const listenPegasus = async ({
|
|
93
|
-
consume: {
|
|
100
|
+
consume: { portAllocator, pegasusConnectionsAdmin: pegasusNameAdmin, zoe },
|
|
94
101
|
produce: { pegasusConnections, pegasusConnectionsAdmin },
|
|
95
102
|
instance: {
|
|
96
103
|
consume: { [CONTRACT_NAME]: pegasusInstance },
|
|
@@ -101,7 +108,7 @@ export const listenPegasus = async ({
|
|
|
101
108
|
pegasusConnectionsAdmin.resolve(nameAdmin);
|
|
102
109
|
|
|
103
110
|
const pegasus = await E(zoe).getPublicFacet(pegasusInstance);
|
|
104
|
-
const port = await E(
|
|
111
|
+
const port = await E(portAllocator).allocateCustomIBCPort('pegasus');
|
|
105
112
|
return addPegasusTransferPort(port, pegasus, pegasusNameAdmin);
|
|
106
113
|
};
|
|
107
114
|
harden(listenPegasus);
|
package/src/types.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
|
|
3
|
-
/// <reference types="ses"/>
|
|
2
|
+
|
|
3
|
+
/// <reference types="ses" />
|
|
4
|
+
/**
|
|
5
|
+
* @import {Bytes, ConnectionHandler} from '@agoric/network';
|
|
6
|
+
*/
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
* @typedef {string} Denom
|
|
@@ -9,9 +12,11 @@
|
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
14
|
* @typedef {object} PacketParts
|
|
12
|
-
* @property {AmountValue} value
|
|
15
|
+
* @property {import('@agoric/ertp/src/types.js').AmountValue} value
|
|
13
16
|
* @property {Denom} remoteDenom
|
|
14
17
|
* @property {DepositAddress} depositAddress
|
|
18
|
+
* @property {string} memo
|
|
19
|
+
* @property {SenderOptions} opts
|
|
15
20
|
*/
|
|
16
21
|
|
|
17
22
|
/**
|
|
@@ -46,7 +51,7 @@
|
|
|
46
51
|
*/
|
|
47
52
|
|
|
48
53
|
/**
|
|
49
|
-
* @typedef {(zcfSeat: ZCFSeat, depositAddress: DepositAddress) => Promise<void>} Sender
|
|
54
|
+
* @typedef {(zcfSeat: ZCFSeat, depositAddress: DepositAddress, memo: string, opt: SenderOptions) => Promise<void>} Sender
|
|
50
55
|
* Successive transfers are not guaranteed to be processed in the order in which they were sent.
|
|
51
56
|
* @typedef {(parts: PacketParts) => Promise<Bytes>} Receiver
|
|
52
57
|
* @typedef {object} Courier
|
|
@@ -110,3 +115,8 @@
|
|
|
110
115
|
* @property {ConnectionHandler} handler
|
|
111
116
|
* @property {Subscription<PegasusConnection>} subscription
|
|
112
117
|
*/
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @typedef {object} SenderOptions
|
|
121
|
+
* @property {string} [sender] the sender address attached to the packet to receive any refund
|
|
122
|
+
*/
|
package/CHANGELOG.md
DELETED
|
@@ -1,442 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
### [0.7.12](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.11...@agoric/pegasus@0.7.12) (2023-06-09)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### [0.7.11](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.10...@agoric/pegasus@0.7.11) (2023-06-02)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### [0.7.10](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.9...@agoric/pegasus@0.7.10) (2023-05-24)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### [0.7.9](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.6...@agoric/pegasus@0.7.9) (2023-05-19)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### Bug Fixes
|
|
34
|
-
|
|
35
|
-
* use `subscribeEach` to get reconnect benefits ([fb24132](https://github.com/Agoric/agoric-sdk/commit/fb24132f9b4e117e56bae2803994e57c188344f3))
|
|
36
|
-
* use atomicTransfers rather than stagings. ([#6577](https://github.com/Agoric/agoric-sdk/issues/6577)) ([65d3f14](https://github.com/Agoric/agoric-sdk/commit/65d3f14c8102993168d2568eed5e6acbcba0c48a))
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### [0.7.8](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.7...@agoric/pegasus@0.7.8) (2023-02-17)
|
|
41
|
-
|
|
42
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### [0.7.7](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.6...@agoric/pegasus@0.7.7) (2022-12-14)
|
|
49
|
-
|
|
50
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### [0.7.6](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.5...@agoric/pegasus@0.7.6) (2022-10-18)
|
|
57
|
-
|
|
58
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### [0.7.5](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.4...@agoric/pegasus@0.7.5) (2022-10-08)
|
|
65
|
-
|
|
66
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
### [0.7.4](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.3...@agoric/pegasus@0.7.4) (2022-10-05)
|
|
73
|
-
|
|
74
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
### [0.7.3](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.2...@agoric/pegasus@0.7.3) (2022-09-20)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
### Bug Fixes
|
|
84
|
-
|
|
85
|
-
* show more stacks ([#5980](https://github.com/Agoric/agoric-sdk/issues/5980)) ([7e22057](https://github.com/Agoric/agoric-sdk/commit/7e220575af0e5b0607d821675c57a3714f48fd65))
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
### [0.7.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.1...@agoric/pegasus@0.7.2) (2022-05-28)
|
|
90
|
-
|
|
91
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### [0.7.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.7.0...@agoric/pegasus@0.7.1) (2022-05-09)
|
|
98
|
-
|
|
99
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
## [0.7.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.6.1...@agoric/pegasus@0.7.0) (2022-04-18)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
### ⚠ BREAKING CHANGES
|
|
109
|
-
|
|
110
|
-
* consistent Node engine requirement (>=14.15.0)
|
|
111
|
-
|
|
112
|
-
### Features
|
|
113
|
-
|
|
114
|
-
* **pegasus:** prepare for governance ([4c921b5](https://github.com/Agoric/agoric-sdk/commit/4c921b501e425e861479c9197bc24d1d09f4a2ac))
|
|
115
|
-
* **vats:** remove pegasus from bootstrap ([c384a41](https://github.com/Agoric/agoric-sdk/commit/c384a41c6e494059beb28c09a94e5625faa5f87e))
|
|
116
|
-
* implement the durable kind API ([56bad98](https://github.com/Agoric/agoric-sdk/commit/56bad985275787d18c34ac14b377a4d0348d699b)), closes [#4495](https://github.com/Agoric/agoric-sdk/issues/4495)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
### Miscellaneous Chores
|
|
120
|
-
|
|
121
|
-
* consistent Node engine requirement (>=14.15.0) ([ddc40fa](https://github.com/Agoric/agoric-sdk/commit/ddc40fa525f845ed900512c38b99f01458a3d131))
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
### [0.6.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.6.0...@agoric/pegasus@0.6.1) (2022-02-24)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
### Features
|
|
129
|
-
|
|
130
|
-
* overhaul the virtual object API ([e40674b](https://github.com/Agoric/agoric-sdk/commit/e40674b0b19f29adde2f5e6a460bafb7340d42b6)), closes [#4606](https://github.com/Agoric/agoric-sdk/issues/4606)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
## [0.6.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.5.1...@agoric/pegasus@0.6.0) (2022-02-21)
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
### ⚠ BREAKING CHANGES
|
|
138
|
-
|
|
139
|
-
* **pegasus:** make more robust and remove public state
|
|
140
|
-
|
|
141
|
-
### Features
|
|
142
|
-
|
|
143
|
-
* **pegasus:** implement correct result and denom trace handling ([aacf1c3](https://github.com/Agoric/agoric-sdk/commit/aacf1c39f840beb31702f3fcd3565771ccaf7817))
|
|
144
|
-
* **pegasus:** make more robust and remove public state ([a5413f7](https://github.com/Agoric/agoric-sdk/commit/a5413f781fc694e3e11804b5288740e9319928ee))
|
|
145
|
-
* **pegasus:** properly abort on connection close ([1b17f7a](https://github.com/Agoric/agoric-sdk/commit/1b17f7aa4de11ccd5a1ec26fc7b6fff017d70ac1))
|
|
146
|
-
* **pegasus:** rejectStuckTransfers, getRemoteDenomSubscription ([54bf0bc](https://github.com/Agoric/agoric-sdk/commit/54bf0bc4e83172396962295ba76b8af3a8846df9))
|
|
147
|
-
* implement persistent stores ([e1050b0](https://github.com/Agoric/agoric-sdk/commit/e1050b010e095b23547a38d48a12e5c8841a7466))
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
### Bug Fixes
|
|
151
|
-
|
|
152
|
-
* **pegasus:** more POLA and less global state ([e7ea320](https://github.com/Agoric/agoric-sdk/commit/e7ea32047f5a87a18c5ed4722d4d6e2163f7f2aa))
|
|
153
|
-
* **pegasus:** more robust ics20 JSON parsing ([208109f](https://github.com/Agoric/agoric-sdk/commit/208109f2e4df9e4df5c2371c6a299a42349d5c69))
|
|
154
|
-
* **pegasus:** only reject transfers waiting for pegRemote ([f1801f6](https://github.com/Agoric/agoric-sdk/commit/f1801f63ad81ec06fc3b86c3a44e98130b310351))
|
|
155
|
-
* **pegasus:** use bigints for nonces ([9065d6e](https://github.com/Agoric/agoric-sdk/commit/9065d6ee205082efd2253e6bd06ee08676535b50))
|
|
156
|
-
* **pegasus:** use dummy ICS20-1 transfer `sender` ([c4056bc](https://github.com/Agoric/agoric-sdk/commit/c4056bcd48800b6bfadb4de5eaccb66af6446ef4))
|
|
157
|
-
* `rejectStuckTransfers` sends a TransferProtocol-level error ([8374f94](https://github.com/Agoric/agoric-sdk/commit/8374f941597e22ac20f40b959381218f03563f65))
|
|
158
|
-
* Enhance TypeScript node_modules traversal depth ([000f738](https://github.com/Agoric/agoric-sdk/commit/000f73850d46dc7272b2399c06ad774dd3b8fe6e))
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### [0.5.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.5.0...@agoric/pegasus@0.5.1) (2021-12-22)
|
|
163
|
-
|
|
164
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
## [0.5.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.4.5...@agoric/pegasus@0.5.0) (2021-12-02)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
### ⚠ BREAKING CHANGES
|
|
174
|
-
|
|
175
|
-
* **zoe:** must harden `amountKeywordRecord` before passing to ZCF objects
|
|
176
|
-
|
|
177
|
-
* chore: fix treasury errors, etc.
|
|
178
|
-
|
|
179
|
-
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
180
|
-
|
|
181
|
-
### Bug Fixes
|
|
182
|
-
|
|
183
|
-
* **zoe:** assert that amountKeywordRecord is a copyRecord ([#4069](https://github.com/Agoric/agoric-sdk/issues/4069)) ([fe9a9ff](https://github.com/Agoric/agoric-sdk/commit/fe9a9ff3de86608a0b1f8f9547059f89d45b948d))
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
### [0.4.5](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.4.4...@agoric/pegasus@0.4.5) (2021-10-13)
|
|
188
|
-
|
|
189
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
### [0.4.4](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.4.3...@agoric/pegasus@0.4.4) (2021-09-23)
|
|
196
|
-
|
|
197
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
### [0.4.3](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.4.2...@agoric/pegasus@0.4.3) (2021-09-15)
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
### Bug Fixes
|
|
207
|
-
|
|
208
|
-
* more missing Fars. kill "this" ([#3746](https://github.com/Agoric/agoric-sdk/issues/3746)) ([7bd027a](https://github.com/Agoric/agoric-sdk/commit/7bd027a879f98a9a3f30429ee1b54e6057efec42))
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
### [0.4.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.4.1...@agoric/pegasus@0.4.2) (2021-08-21)
|
|
213
|
-
|
|
214
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
### [0.4.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.4.0...@agoric/pegasus@0.4.1) (2021-08-18)
|
|
221
|
-
|
|
222
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
## [0.4.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.12...@agoric/pegasus@0.4.0) (2021-08-17)
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
### ⚠ BREAKING CHANGES
|
|
232
|
-
|
|
233
|
-
* make the run mint within Zoe, and give only the treasury the ability to create a ZCFMint with it
|
|
234
|
-
|
|
235
|
-
* chore: change 'makeZoe' to 'makeZoeKit'
|
|
236
|
-
|
|
237
|
-
* chore: add "shutdownZoeVat" argument to Zoe, and pass it to `makeIssuerKit` for invitation issuerKit and fee issuerKit
|
|
238
|
-
|
|
239
|
-
* chore: manually lint-fix install-on-chain.js
|
|
240
|
-
|
|
241
|
-
See https://github.com/Agoric/agoric-sdk/issues/3672 for the issue to fix the root problem
|
|
242
|
-
|
|
243
|
-
* BREAKING CHANGE: create the RUN Mint within Zoe (#3647) ([48762aa](https://github.com/Agoric/agoric-sdk/commit/48762aa83a30eaa0a14b2fd87777456758594262)), closes [#3647](https://github.com/Agoric/agoric-sdk/issues/3647)
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
### [0.3.12](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.11...@agoric/pegasus@0.3.12) (2021-08-16)
|
|
248
|
-
|
|
249
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
### [0.3.11](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.8...@agoric/pegasus@0.3.11) (2021-08-15)
|
|
256
|
-
|
|
257
|
-
### 0.26.10 (2021-07-28)
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
### Bug Fixes
|
|
261
|
-
|
|
262
|
-
* zoe/spawner/pegasus: use unlimited Meter, not metered: true ([04d4fd9](https://github.com/Agoric/agoric-sdk/commit/04d4fd96982ecd02de50f09fa38c6e2800cca527)), closes [#3308](https://github.com/Agoric/agoric-sdk/issues/3308)
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
### [0.3.10](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.8...@agoric/pegasus@0.3.10) (2021-08-14)
|
|
267
|
-
|
|
268
|
-
### 0.26.10 (2021-07-28)
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
### Bug Fixes
|
|
272
|
-
|
|
273
|
-
* zoe/spawner/pegasus: use unlimited Meter, not metered: true ([04d4fd9](https://github.com/Agoric/agoric-sdk/commit/04d4fd96982ecd02de50f09fa38c6e2800cca527)), closes [#3308](https://github.com/Agoric/agoric-sdk/issues/3308)
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
### [0.3.9](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.8...@agoric/pegasus@0.3.9) (2021-07-28)
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
### Bug Fixes
|
|
281
|
-
|
|
282
|
-
* zoe/spawner/pegasus: use unlimited Meter, not metered: true ([04d4fd9](https://github.com/Agoric/agoric-sdk/commit/04d4fd96982ecd02de50f09fa38c6e2800cca527)), closes [#3308](https://github.com/Agoric/agoric-sdk/issues/3308)
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
### [0.3.8](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.7...@agoric/pegasus@0.3.8) (2021-07-01)
|
|
287
|
-
|
|
288
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
### [0.3.7](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.6...@agoric/pegasus@0.3.7) (2021-07-01)
|
|
295
|
-
|
|
296
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
### [0.3.6](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.5...@agoric/pegasus@0.3.6) (2021-06-28)
|
|
303
|
-
|
|
304
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
### [0.3.5](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.4...@agoric/pegasus@0.3.5) (2021-06-25)
|
|
311
|
-
|
|
312
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
### [0.3.4](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.3...@agoric/pegasus@0.3.4) (2021-06-24)
|
|
319
|
-
|
|
320
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
### [0.3.3](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.2...@agoric/pegasus@0.3.3) (2021-06-24)
|
|
327
|
-
|
|
328
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
### [0.3.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.1...@agoric/pegasus@0.3.2) (2021-06-23)
|
|
335
|
-
|
|
336
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
### [0.3.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.3.0...@agoric/pegasus@0.3.1) (2021-06-16)
|
|
343
|
-
|
|
344
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
## [0.3.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.2.7...@agoric/pegasus@0.3.0) (2021-06-15)
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
### ⚠ BREAKING CHANGES
|
|
354
|
-
|
|
355
|
-
* **zoe:** new reallocate API to assist with reviewing conservation of rights (#3184)
|
|
356
|
-
|
|
357
|
-
### Bug Fixes
|
|
358
|
-
|
|
359
|
-
* Pin ESM to forked version ([54dbb55](https://github.com/Agoric/agoric-sdk/commit/54dbb55d64d7ff7adb395bc4bd9d1461dd2d3c17))
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
### Code Refactoring
|
|
363
|
-
|
|
364
|
-
* **zoe:** new reallocate API to assist with reviewing conservation of rights ([#3184](https://github.com/Agoric/agoric-sdk/issues/3184)) ([f34e5ea](https://github.com/Agoric/agoric-sdk/commit/f34e5eae0812a9823d40d2d05ba98522c7846f2a))
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
## [0.2.7](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.2.6...@agoric/pegasus@0.2.7) (2021-05-10)
|
|
369
|
-
|
|
370
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
## [0.2.6](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.2.5...@agoric/pegasus@0.2.6) (2021-05-05)
|
|
377
|
-
|
|
378
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
## [0.2.5](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.2.4...@agoric/pegasus@0.2.5) (2021-05-05)
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
### Bug Fixes
|
|
388
|
-
|
|
389
|
-
* **pegasus:** update to new solo package ([cf91a04](https://github.com/Agoric/agoric-sdk/commit/cf91a04fa6ce53dc06de0ccb8c8173050134575a))
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
## [0.2.4](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.2.3...@agoric/pegasus@0.2.4) (2021-04-22)
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
### Bug Fixes
|
|
399
|
-
|
|
400
|
-
* rename cosmos-level tokens uagstake/uag to ubld/urun ([0557983](https://github.com/Agoric/agoric-sdk/commit/0557983210571c9c2ba801d68644d71641a3f790))
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
## [0.2.3](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.2.2...@agoric/pegasus@0.2.3) (2021-04-18)
|
|
407
|
-
|
|
408
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
## [0.2.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.2.1...@agoric/pegasus@0.2.2) (2021-04-16)
|
|
415
|
-
|
|
416
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
## [0.2.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/pegasus@0.2.0...@agoric/pegasus@0.2.1) (2021-04-14)
|
|
423
|
-
|
|
424
|
-
**Note:** Version bump only for package @agoric/pegasus
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
# 0.2.0 (2021-04-13)
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
### Bug Fixes
|
|
434
|
-
|
|
435
|
-
* adjust Pegasus to actually work correctly with pegRemote ([8cd8c72](https://github.com/Agoric/agoric-sdk/commit/8cd8c72bc5fa207471ac2fdd9ac750dbdda7c39f))
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
### Features
|
|
439
|
-
|
|
440
|
-
* install Pegasus on chain bootstrap ([7615292](https://github.com/Agoric/agoric-sdk/commit/76152926942f9c0610ab3d08a45c464856779643))
|
|
441
|
-
* integrate pegasus in chain bootstrap ([5c7ecba](https://github.com/Agoric/agoric-sdk/commit/5c7ecba05d0e6ec7ef9fe127ee89e0c79d3e6511))
|
|
442
|
-
* move Pegasus contract to SDK ([d0ca2cc](https://github.com/Agoric/agoric-sdk/commit/d0ca2cc155953c63eef5f56f236fa9280984730a))
|
package/exported.js
DELETED
package/scripts/build-bundles.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#! /usr/bin/env node
|
|
2
|
-
import '@endo/init';
|
|
3
|
-
import { extractProposalBundles } from '@agoric/deploy-script-support';
|
|
4
|
-
import url from 'url';
|
|
5
|
-
|
|
6
|
-
import { defaultProposalBuilder } from './init-core.js';
|
|
7
|
-
|
|
8
|
-
const dirname = url.fileURLToPath(new URL('.', import.meta.url));
|
|
9
|
-
extractProposalBundles([['.', defaultProposalBuilder]], dirname);
|
package/scripts/init-core.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
-
|
|
3
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
|
|
4
|
-
export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
5
|
-
harden({
|
|
6
|
-
sourceSpec: '../src/proposals/core-proposal.js',
|
|
7
|
-
getManifestCall: [
|
|
8
|
-
'getManifestForPegasus',
|
|
9
|
-
{
|
|
10
|
-
pegasusRef: publishRef(
|
|
11
|
-
install('../src/pegasus.js', '../bundles/bundle-pegasus.js'),
|
|
12
|
-
),
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export default async (homeP, endowments) => {
|
|
18
|
-
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
|
|
19
|
-
await writeCoreProposal('gov-pegasus', defaultProposalBuilder);
|
|
20
|
-
};
|