Skip to content

Commit c1d7196

Browse files
Merge pull request #2 from logicalmechanism/v3-review-2
Name changes and adding back in the yml workspace file
2 parents 6750a31 + e07d0c7 commit c1d7196

File tree

6 files changed

+82
-19
lines changed

6 files changed

+82
-19
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Continuous Integration
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: ["main"]
7+
tags: ["*.*.*"]
8+
pull_request:
9+
branches: ["main"]
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: true
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: 📥 Checkout repository
28+
uses: actions/checkout@v3
29+
30+
- name: 🧰 Setup Pages
31+
uses: actions/configure-pages@v2
32+
33+
- name: 🧰 Install Aiken
34+
uses: aiken-lang/setup-aiken@v0.1.0
35+
with:
36+
version: v1.0.18-alpha
37+
38+
- name: 📝 Run fmt
39+
run: aiken fmt --check
40+
41+
- name: 🔬 Run tests
42+
run: aiken check
43+
44+
- name: 📘 Generate documentation
45+
shell: bash
46+
working-directory: .
47+
run: aiken docs -o docs
48+
49+
- name: 📦 Upload artifact
50+
uses: actions/upload-pages-artifact@v2
51+
with:
52+
path: "docs/"
53+
54+
deploy:
55+
if: ${{ startsWith(github.ref, 'refs/tags') }}
56+
needs: build
57+
runs-on: ubuntu-latest
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
steps:
62+
- name: 🚀 Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v1

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
build/
22
docs/
3-
.DS_Store
4-
.github/workflows/
3+
.DS_Store

lib/aiken/transaction.ak

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use aiken/option
77
use aiken/time.{PosixTime}
88
use aiken/transaction/certificate.{Certificate}
99
use aiken/transaction/credential.{
10-
Address, Credential, DatumHashDigest, PubKeyHash, ScriptCredential, ScriptHash,
11-
VerificationKeyCredential,
10+
Address, Credential, DatumHashDigest, ScriptCredential, ScriptHash,
11+
VerificationKeyCredential, VerificationKeyHash,
1212
}
1313
use aiken/transaction/governance.{
1414
GovernanceActionId, ProposalProcedure, Vote, Voter,
@@ -46,7 +46,7 @@ pub type ScriptPurpose {
4646
/// stake credentials.
4747
///
4848
/// The Int is a 0-based index of the given `TxCert` in `certificates`.
49-
Publish(Int, Certificate)
49+
Publish { certificate_index: Int, certificate: Certificate }
5050
/// Voting for a type of voter using a governance action id to vote
5151
/// yes / no / abstain inside a transaction.
5252
///
@@ -55,7 +55,7 @@ pub type ScriptPurpose {
5555
/// Used to propose a governance action.
5656
///
5757
/// A 0-based index of the given `ProposalProcedure` in `proposal_procedures`.
58-
Proposing(Int, ProposalProcedure)
58+
Proposing { proposal_index: Int, proposal: ProposalProcedure }
5959
}
6060

6161
/// A Cardano `Transaction`, as seen by Plutus scripts.
@@ -75,7 +75,7 @@ pub type Transaction {
7575
certificates: List<Certificate>,
7676
withdrawals: Dict<Credential, Lovelace>,
7777
validity_range: ValidityRange,
78-
extra_signatories: List<PubKeyHash>,
78+
extra_signatories: List<VerificationKeyHash>,
7979
redeemers: Dict<ScriptPurpose, Redeemer>,
8080
datums: Dict<DatumHashDigest, Data>,
8181
id: TransactionId,

lib/aiken/transaction/certificate.ak

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use aiken/transaction/credential.{
22
ColdCommitteeCredential, Credential, DRepCredential, HotCommitteeCredential,
3-
PubKeyHash,
3+
PoolId, VerificationKeyHash,
44
}
55
use aiken/transaction/governance.{Delegatee}
66
use aiken/transaction/value.{Lovelace}
@@ -23,16 +23,16 @@ pub type Certificate {
2323
// Update a DRep. The optional anchor is omitted.
2424
UpdateDRep(DRepCredential)
2525
// UnRegister a DRep with mandatory refund value
26-
UnRegisterDRep(DRepCredential, Lovelace)
26+
UnregisterDRep(DRepCredential, Lovelace)
2727
// A digest of the PoolParams
2828
PoolRegister(
2929
// poolId
30-
PubKeyHash,
30+
PoolId,
3131
// pool VFR
32-
PubKeyHash,
32+
VerificationKeyHash,
3333
)
3434
// The retirement certificate and the Epoch in which the retirement will take place
35-
PoolRetire(PubKeyHash, Int)
35+
PoolRetire(VerificationKeyHash, Int)
3636
// Authorize a Hot credential for a specific Committee member's cold credential
3737
AuthorizeHotCommittee(ColdCommitteeCredential, HotCommitteeCredential)
3838
ResignColdCommittee(ColdCommitteeCredential)

lib/aiken/transaction/credential.ak

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ pub type StakeCredential =
107107
pub type PaymentCredential =
108108
Credential
109109

110-
/// A unique stake pool identifier, as a hash of its owner verification key.
111110
pub type PoolId =
112111
Hash<Blake2b_224, VerificationKey>
113112

114-
pub type PubKeyHash =
113+
pub type VerificationKeyHash =
115114
Hash<Blake2b_224, VerificationKey>
116115

117116
pub type ScriptHash =
118117
Hash<Blake2b_224, Script>
119118

119+
// DatumHash is taken as a Datum type so this may just need to change.
120120
pub type DatumHashDigest =
121121
Hash<Blake2b_256, Data>
122122

lib/aiken/transaction/governance.ak

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use aiken/dict.{Dict}
22
use aiken/math/rational.{Rational}
33
use aiken/transaction/credential.{
44
ColdCommitteeCredential, Credential, DRepCredential, HotCommitteeCredential,
5-
PubKeyHash, ScriptHash,
5+
ScriptHash, VerificationKeyHash,
66
}
77
use aiken/transaction/value.{Lovelace}
88

@@ -13,9 +13,9 @@ pub type DRep {
1313
}
1414

1515
pub type Delegatee {
16-
DelegateStake(PubKeyHash)
16+
DelegateStake(VerificationKeyHash)
1717
DelegateVote(DRep)
18-
DelegateBoth(PubKeyHash, DRep)
18+
DelegateBoth(VerificationKeyHash, DRep)
1919
}
2020

2121
pub type Vote {
@@ -29,7 +29,7 @@ pub type GovernanceActionId {
2929
index: Int,
3030
}
3131

32-
pub type ChangedParameters {
32+
pub type ChangedProtocolParameters {
3333
new_parameters: Data,
3434
}
3535

@@ -85,5 +85,5 @@ pub type ProposalProcedure {
8585
pub type Voter {
8686
CommitteeVoter(HotCommitteeCredential)
8787
DRepVoter(DRepCredential)
88-
StakePoolVoter(PubKeyHash)
88+
StakePoolVoter(VerificationKeyHash)
8989
}

0 commit comments

Comments
 (0)