-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
1 parent
f6ef0a0
commit f0f6a69
Showing
35 changed files
with
372 additions
and
76 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 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,13 @@ | ||
# plu-ts related Catalyst proposals | ||
|
||
## Current found ( Found 10 ) | ||
|
||
date to be announced | ||
|
||
## old proposals: | ||
|
||
- Found 9: | ||
- [(passed, not founded) Typescript smart-contracts](https://cardano.ideascale.com/c/idea/414103) | ||
- [(passed, not founded) 100% Typescript offchain code](https://cardano.ideascale.com/c/idea/414144) | ||
- Found 8: | ||
- [(passed, not founded) Offchain Typescript library](https://cardano.ideascale.com/c/idea/396949) | ||
- Fund 12: none | ||
- Fund 11: | ||
- [HLabs: plu-ts - ts framework for Cardano smart contracts](https://cardano.ideascale.com/c/idea/111482) FUNDED | ||
- Fund 10: | ||
- [plu-ts Typescript smart-contracts - road to production](https://cardano.ideascale.com/c/idea/100658) NOT FUNDED | ||
- [plu-ts - 0 to full Cardano dApp tutorial/documentation](https://cardano.ideascale.com/c/idea/101023) FUNDED | ||
- Fund 9: | ||
- [(passed, not founded) Typescript smart-contracts](https://cardano.ideascale.com/c/idea/414103) NOT FUNDED | ||
- [(passed, not founded) 100% Typescript offchain code](https://cardano.ideascale.com/c/idea/414144) NOT FUNDED | ||
- Fund 8: | ||
- [(passed, not founded) Offchain Typescript library](https://cardano.ideascale.com/c/idea/396949) NOT FUNDED |
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 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 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 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,10 +1,9 @@ | ||
import { pstruct } from "../../../PTypes/PStruct/pstruct"; | ||
import { PLowerBound } from "./PLowerBound"; | ||
import { PUpperBound } from "./PUpperBound"; | ||
import { PBound } from "./PBound"; | ||
|
||
export const PInterval = pstruct({ | ||
PInterval: { | ||
from: PLowerBound.type, | ||
to: PUpperBound.type | ||
from: PBound.type, | ||
to: PBound.type | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
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 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
53 changes: 53 additions & 0 deletions
53
packages/onchain/src/pluts/API/V3/Governance/PChangedParams.ts
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,53 @@ | ||
import { palias } from "../../../PTypes/PAlias/palias"; | ||
import { data, map } from "../../../type_system"; | ||
|
||
/** | ||
{- | A Plutus Data object containing proposed parameter changes. The Data object contains | ||
a @Map@ with one entry per changed parameter, from the parameter ID to the new value. | ||
Unchanged parameters are not included. | ||
The mapping from parameter IDs to parameters can be found in | ||
[conway.cddl](https://github.com/IntersectMBO/cardano-ledger/blob/master/eras/conway/impl/cddl-files/conway.cddl). | ||
/Invariant:/ This map is non-empty, and the keys are stored in ascending order. | ||
-} | ||
important note: | ||
we can't really type this map because the values of each parameters are different | ||
protocol_param_update = | ||
{ ? 0: coin ; minfee A | ||
, ? 1: coin ; minfee B | ||
, ? 2: uint .size 4 ; max block body size | ||
, ? 3: uint .size 4 ; max transaction size | ||
, ? 4: uint .size 2 ; max block header size | ||
, ? 5: coin ; key deposit | ||
, ? 6: coin ; pool deposit | ||
, ? 7: epoch_interval ; maximum epoch | ||
, ? 8: uint .size 2 ; n_opt: desired number of stake pools | ||
, ? 9: nonnegative_interval ; pool pledge influence | ||
, ? 10: unit_interval ; expansion rate | ||
, ? 11: unit_interval ; treasury growth rate | ||
, ? 16: coin ; min pool cost | ||
, ? 17: coin ; ada per utxo byte | ||
, ? 18: costmdls ; cost models for script languages | ||
, ? 19: ex_unit_prices ; execution costs | ||
, ? 20: ex_units ; max tx ex units | ||
, ? 21: ex_units ; max block ex units | ||
, ? 22: uint .size 4 ; max value size | ||
, ? 23: uint .size 2 ; collateral percentage | ||
, ? 24: uint .size 2 ; max collateral inputs | ||
, ? 25: pool_voting_thresholds ; pool voting thresholds | ||
, ? 26: drep_voting_thresholds ; DRep voting thresholds | ||
, ? 27: uint .size 2 ; min committee size | ||
, ? 28: epoch_interval ; committee term limit | ||
, ? 29: epoch_interval ; governance action validity period | ||
, ? 30: coin ; governance action deposit | ||
, ? 31: coin ; DRep deposit | ||
, ? 32: epoch_interval ; DRep inactivity period | ||
, ? 33: nonnegative_interval ; MinFee RefScriptCostPerByte | ||
} | ||
*/ | ||
export const PChangedParams = palias( map( data, data ) ); |
4 changes: 2 additions & 2 deletions
4
packages/onchain/src/pluts/API/V3/PDRep.ts → ...hain/src/pluts/API/V3/Governance/PDRep.ts
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
51 changes: 51 additions & 0 deletions
51
packages/onchain/src/pluts/API/V3/Governance/PGovernanceAction.ts
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 { PMaybe } from "../../../lib"; | ||
import { pstruct } from "../../../PTypes/PStruct/pstruct"; | ||
import { int, list, map } from "../../../type_system/types"; | ||
import { PCredential } from "../../V1/Address/PCredential"; | ||
import { PValidatorHash } from "../../V1/ScriptsHashes/PValidatorHash"; | ||
import { PTxOutRef } from "../Tx/PTxOutRef"; | ||
import { PChangedParams } from "./PChangedParams"; | ||
import { PProtocolVersion } from "./PProtocolVersion"; | ||
|
||
export const PRational = pstruct({ | ||
PRational: { | ||
numerator: int, | ||
denominator: int | ||
} | ||
}); | ||
|
||
export const PConstitution = pstruct({ | ||
PConstitution: { | ||
constitutionScriptHash: PMaybe( PValidatorHash.type ).type | ||
} | ||
}); | ||
|
||
export const PGovernanceAction = pstruct({ | ||
ParameterChange: { | ||
govActionId: PMaybe( PTxOutRef.type ).type, | ||
changedParameters: PChangedParams.type, | ||
constitutionScriptHash: PMaybe( PValidatorHash.type ).type | ||
}, | ||
HardForkInitiation: { | ||
govActionId: PMaybe( PTxOutRef.type ).type, | ||
nextProtocolVersion: PProtocolVersion.type | ||
}, | ||
TreasuryWithdrawals: { | ||
withdrawals: map( PCredential.type, int ), | ||
constitutionScriptHash: PMaybe( PValidatorHash.type ).type | ||
}, | ||
NoConfidence: { | ||
govActionId: PMaybe( PTxOutRef.type ).type | ||
}, | ||
UpdateCommittee: { | ||
govActionId: PMaybe( PTxOutRef.type ).type, | ||
removedMembers: list( PCredential.type ), | ||
newMembers: map( PCredential.type, int ), | ||
newQuorum: PRational.type | ||
}, | ||
NewConstitution: { | ||
govActionId: PMaybe( PTxOutRef.type ).type, | ||
consitution: PConstitution.type | ||
}, | ||
InfoAction: {} | ||
}); |
13 changes: 13 additions & 0 deletions
13
packages/onchain/src/pluts/API/V3/Governance/PProposalProcedure.ts
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,13 @@ | ||
import { pstruct } from "../../../PTypes/PStruct/pstruct"; | ||
import { int } from "../../../type_system"; | ||
import { PCredential } from "../../V1/Address/PCredential"; | ||
import { PGovernanceAction } from "./PGovernanceAction"; | ||
|
||
export const PProposalProcedure = pstruct({ | ||
PProposalProcedure: { | ||
/** lovelaces */ | ||
deposit: int, | ||
returnCredentials: PCredential.type, | ||
governanceAction: PGovernanceAction.type | ||
} | ||
}); |
9 changes: 9 additions & 0 deletions
9
packages/onchain/src/pluts/API/V3/Governance/PProtocolVersion.ts
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,9 @@ | ||
import { pstruct } from "../../../PTypes/PStruct/pstruct"; | ||
import { int } from "../../../type_system/types"; | ||
|
||
export const PProtocolVersion = pstruct({ | ||
PProtocolVersion: { | ||
major: int, | ||
minor: int | ||
} | ||
}); |
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,7 @@ | ||
import { pstruct } from "../../../PTypes/PStruct/pstruct"; | ||
|
||
export const PVote = pstruct({ | ||
No: {}, | ||
Yes: {}, | ||
Abstain: {} | ||
}); |
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,9 @@ | ||
import { pstruct } from "../../../PTypes/PStruct/pstruct"; | ||
import { PCredential } from "../../V1/Address/PCredential"; | ||
import { PPubKeyHash } from "../../V1/PubKey/PPubKeyHash"; | ||
|
||
export const PVoter = pstruct({ | ||
Committee: { hotCredentials: PCredential.type }, | ||
DRep: { credentials: PCredential.type }, | ||
StakePool: { poolHash: PPubKeyHash.type } | ||
}); |
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,7 @@ | ||
export * from "./PChangedParams"; | ||
export * from "./PGovernanceAction"; | ||
export * from "./PProposalProcedure"; | ||
export * from "./PProtocolVersion"; | ||
export * from "./PVote"; | ||
export * from "./PVoter"; | ||
export * from "./PDRep"; |
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
6 changes: 3 additions & 3 deletions
6
...es/onchain/src/pluts/API/V3/PDelegatee.ts → .../pluts/API/V3/ScriptContext/PDelegatee.ts
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
12 changes: 12 additions & 0 deletions
12
packages/onchain/src/pluts/API/V3/ScriptContext/PScriptContext.ts
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,12 @@ | ||
import { pstruct } from "../../../PTypes/PStruct/pstruct"; | ||
import { data } from "../../../type_system"; | ||
import { PScriptInfo } from "./PScriptInfo"; | ||
import { PTxInfo } from "./PTxInfo"; | ||
|
||
export const PScriptContext = pstruct({ | ||
PScriptContext: { | ||
tx: PTxInfo.type, | ||
redeemer: data, | ||
purpose: PScriptInfo.type | ||
} | ||
}); |
Oops, something went wrong.