Skip to content

Commit 734486c

Browse files
authored
Merge pull request #26 from Birdmannn/test-#13
Unit and Integration Tests for Genesis Smart Contract
2 parents d1af155 + 1f59c61 commit 734486c

6 files changed

Lines changed: 512 additions & 326 deletions

File tree

contract_/src/BigIncGenesis.cairo

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub mod BigIncGenesis {
109109

110110
#[event]
111111
#[derive(Drop, starknet::Event)]
112-
enum Event {
112+
pub enum Event {
113113
#[flat]
114114
OwnableEvent: OwnableComponent::Event,
115115
#[flat]
@@ -128,69 +128,69 @@ pub mod BigIncGenesis {
128128
}
129129

130130
#[derive(Drop, starknet::Event)]
131-
struct ShareMinted {
131+
pub struct ShareMinted {
132132
#[key]
133-
buyer: ContractAddress,
134-
shares_bought: u256,
135-
amount: u256,
133+
pub buyer: ContractAddress,
134+
pub shares_bought: u256,
135+
pub amount: u256,
136136
}
137137

138138
#[derive(Drop, starknet::Event)]
139-
struct PresaleEnded {}
139+
pub struct PresaleEnded {}
140140

141141
#[derive(Drop, starknet::Event)]
142-
struct TransferShare {
142+
pub struct TransferShare {
143143
#[key]
144-
from: ContractAddress,
144+
pub from: ContractAddress,
145145
#[key]
146-
to: ContractAddress,
147-
share_amount: u256,
146+
pub to: ContractAddress,
147+
pub share_amount: u256,
148148
}
149149

150150
#[derive(Drop, starknet::Event)]
151-
struct Donate {
151+
pub struct Donate {
152152
#[key]
153-
donor: ContractAddress,
154-
token_address: ContractAddress,
155-
amount: u256,
153+
pub donor: ContractAddress,
154+
pub token_address: ContractAddress,
155+
pub amount: u256,
156156
}
157157

158158
#[derive(Drop, starknet::Event)]
159-
struct SharesSeized {
159+
pub struct SharesSeized {
160160
#[key]
161-
shareholder: ContractAddress,
162-
share_amount: u256,
161+
pub shareholder: ContractAddress,
162+
pub share_amount: u256,
163163
}
164164

165165
#[derive(Drop, starknet::Event)]
166-
struct AllSharesSold {}
166+
pub struct AllSharesSold {}
167167

168168

169169
#[derive(Drop, starknet::Event)]
170-
struct Withdrawn {
170+
pub struct Withdrawn {
171171
#[key]
172-
token_address: ContractAddress,
173-
amount: u256,
174-
owner: ContractAddress,
175-
timestamp: u256,
172+
pub token_address: ContractAddress,
173+
pub amount: u256,
174+
pub owner: ContractAddress,
175+
pub timestamp: u256,
176176
}
177177

178178
#[derive(Drop, starknet::Event)]
179-
struct PartnerShareCapSet {
179+
pub struct PartnerShareCapSet {
180180
#[key]
181-
token_address: ContractAddress,
182-
cap: u256,
181+
pub token_address: ContractAddress,
182+
pub cap: u256,
183183
}
184184

185185
#[derive(Drop, starknet::Event)]
186-
struct PartnerShareMinted {
186+
pub struct PartnerShareMinted {
187187
#[key]
188-
token_address: ContractAddress,
188+
pub token_address: ContractAddress,
189189
#[key]
190-
buyer: ContractAddress,
191-
amount_paid: u256,
192-
shares_received: u256,
193-
rate: u256,
190+
pub buyer: ContractAddress,
191+
pub amount_paid: u256,
192+
pub shares_received: u256,
193+
pub rate: u256,
194194
}
195195

196196
#[constructor]

0 commit comments

Comments
 (0)