Skip to content

Commit 8b2b598

Browse files
committed
refactor: add placeholders for v11 fields and methods
1 parent 37b9e28 commit 8b2b598

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

src/impl/acct-params.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,14 @@ export const AcctParams: internal.opTypes.AcctParamsType = {
7070
const acct = getAccount(a)
7171
return [acct.totalBoxBytes, acct.balance !== 0]
7272
},
73+
// TODO: implement v11 methods
74+
acctIncentiveEligible: function (_a: Account | uint64): readonly [boolean, boolean] {
75+
throw new Error('Function not implemented.')
76+
},
77+
acctLastProposed: function (_a: Account | uint64): readonly [uint64, boolean] {
78+
throw new Error('Function not implemented.')
79+
},
80+
acctLastHeartbeat: function (_a: Account | uint64): readonly [uint64, boolean] {
81+
throw new Error('Function not implemented.')
82+
},
7383
}

src/impl/block.ts

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { bytes, internal, uint64 } from '@algorandfoundation/algorand-typescript'
1+
import { Account, bytes, internal, uint64 } from '@algorandfoundation/algorand-typescript'
22
import { lazyContext } from '../context-helpers/internal-context'
3-
import { itob } from './pure'
43
import { asUint64 } from '../util'
4+
import { itob } from './pure'
55

66
export const Block: internal.opTypes.BlockType = {
77
blkSeed: function (a: internal.primitives.StubUint64Compat): bytes {
@@ -10,4 +10,29 @@ export const Block: internal.opTypes.BlockType = {
1010
blkTimestamp: function (a: internal.primitives.StubUint64Compat): uint64 {
1111
return asUint64(lazyContext.ledger.getBlockContent(a).timestamp)
1212
},
13+
// TODO: implement v11 methods
14+
blkProposer: function (_a: uint64): Account {
15+
throw new Error('Function not implemented.')
16+
},
17+
blkFeesCollected: function (_a: uint64): uint64 {
18+
throw new Error('Function not implemented.')
19+
},
20+
blkBonus: function (_a: uint64): uint64 {
21+
throw new Error('Function not implemented.')
22+
},
23+
blkBranch: function (_a: uint64): bytes {
24+
throw new Error('Function not implemented.')
25+
},
26+
blkFeeSink: function (_a: uint64): Account {
27+
throw new Error('Function not implemented.')
28+
},
29+
blkProtocol: function (_a: uint64): bytes {
30+
throw new Error('Function not implemented.')
31+
},
32+
blkTxnCounter: function (_a: uint64): uint64 {
33+
throw new Error('Function not implemented.')
34+
},
35+
blkProposerPayout: function (_a: uint64): uint64 {
36+
throw new Error('Function not implemented.')
37+
},
1338
}

src/impl/global.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,10 @@ export const Global: internal.opTypes.GlobalType = {
187187
get genesisHash(): bytes {
188188
return getGlobalData().genesisHash
189189
},
190+
payoutsEnabled: false,
191+
// TODO: implement v11 fields
192+
payoutsGoOnlineFee: 0,
193+
payoutsPercent: 0,
194+
payoutsMinBalance: 0,
195+
payoutsMaxBalance: 0,
190196
}

0 commit comments

Comments
 (0)