@@ -16,8 +16,6 @@ package database
1616
1717import (
1818 "github.com/blinklabs-io/dingo/database/models"
19- "github.com/blinklabs-io/dingo/database/types"
20- lcommon "github.com/blinklabs-io/gouroboros/ledger/common"
2119)
2220
2321// GetAccount returns an account by staking key
@@ -38,143 +36,3 @@ func (d *Database) GetAccount(
3836 }
3937 return account , nil
4038}
41-
42- // SetDeregistration saves a deregistration certificate
43- func (d * Database ) SetDeregistration (
44- cert * lcommon.DeregistrationCertificate ,
45- slot uint64 ,
46- txn * Txn ,
47- ) error {
48- return d .metadata .SetDeregistration (
49- cert ,
50- slot ,
51- txn .Metadata (),
52- )
53- }
54-
55- // SetRegistration saves a registration certificate
56- func (d * Database ) SetRegistration (
57- cert * lcommon.RegistrationCertificate ,
58- slot uint64 ,
59- deposit uint64 ,
60- txn * Txn ,
61- ) error {
62- return d .metadata .SetRegistration (
63- cert ,
64- slot ,
65- types .Uint64 (deposit ),
66- txn .Metadata (),
67- )
68- }
69-
70- // SetStakeDelegation saves a stake delegation certificate
71- func (d * Database ) SetStakeDelegation (
72- cert * lcommon.StakeDelegationCertificate ,
73- slot uint64 ,
74- txn * Txn ,
75- ) error {
76- return d .metadata .SetStakeDelegation (
77- cert ,
78- slot ,
79- txn .Metadata (),
80- )
81- }
82-
83- // SetStakeDeregistration saves a stake deregistration certificate
84- func (d * Database ) SetStakeDeregistration (
85- cert * lcommon.StakeDeregistrationCertificate ,
86- slot uint64 ,
87- txn * Txn ,
88- ) error {
89- return d .metadata .SetStakeDeregistration (
90- cert ,
91- slot ,
92- txn .Metadata (),
93- )
94- }
95-
96- // SetStakeRegistration saves a stake registration certificate
97- func (d * Database ) SetStakeRegistration (
98- cert * lcommon.StakeRegistrationCertificate ,
99- slot uint64 ,
100- deposit uint64 ,
101- txn * Txn ,
102- ) error {
103- return d .metadata .SetStakeRegistration (
104- cert ,
105- slot ,
106- types .Uint64 (deposit ),
107- txn .Metadata (),
108- )
109- }
110-
111- // SetStakeRegistrationDelegation saves a stake registration delegation certificate
112- func (d * Database ) SetStakeRegistrationDelegation (
113- cert * lcommon.StakeRegistrationDelegationCertificate ,
114- slot uint64 ,
115- deposit uint64 ,
116- txn * Txn ,
117- ) error {
118- return d .metadata .SetStakeRegistrationDelegation (
119- cert ,
120- slot ,
121- types .Uint64 (deposit ),
122- txn .Metadata (),
123- )
124- }
125-
126- // SetStakeVoteDelegation saves a stake vote delegation certificate
127- func (d * Database ) SetStakeVoteDelegation (
128- cert * lcommon.StakeVoteDelegationCertificate ,
129- slot uint64 ,
130- txn * Txn ,
131- ) error {
132- return d .metadata .SetStakeVoteDelegation (
133- cert ,
134- slot ,
135- txn .Metadata (),
136- )
137- }
138-
139- // SetStakeVoteRegistrationDelegation saves a stake vote registration delegation certificate
140- func (d * Database ) SetStakeVoteRegistrationDelegation (
141- cert * lcommon.StakeVoteRegistrationDelegationCertificate ,
142- slot uint64 ,
143- deposit uint64 ,
144- txn * Txn ,
145- ) error {
146- return d .metadata .SetStakeVoteRegistrationDelegation (
147- cert ,
148- slot ,
149- types .Uint64 (deposit ),
150- txn .Metadata (),
151- )
152- }
153-
154- // SetVoteDelegation saves a vote delegation certificate
155- func (d * Database ) SetVoteDelegation (
156- cert * lcommon.VoteDelegationCertificate ,
157- slot uint64 ,
158- txn * Txn ,
159- ) error {
160- return d .metadata .SetVoteDelegation (
161- cert ,
162- slot ,
163- txn .Metadata (),
164- )
165- }
166-
167- // SetVoteRegistrationDelegation saves a vote registration delegation certificate
168- func (d * Database ) SetVoteRegistrationDelegation (
169- cert * lcommon.VoteRegistrationDelegationCertificate ,
170- slot uint64 ,
171- deposit uint64 ,
172- txn * Txn ,
173- ) error {
174- return d .metadata .SetVoteRegistrationDelegation (
175- cert ,
176- slot ,
177- types .Uint64 (deposit ),
178- txn .Metadata (),
179- )
180- }
0 commit comments