(define-constant OWNER tx-sender)
(define-constant ERR_NO_AUTHORITY 8001)

(define-public (set_master_contract (contract_owner principal))
  (begin
    (asserts! (is-eq tx-sender OWNER) (err ERR_NO_AUTHORITY))
    (try! (contract-call? .bridge set_master_contract contract_owner))
    (try! (contract-call? .a1 set_master_contract .bridge))
    (try! (contract-call? .a2 set_master_contract .bridge))
    (try! (contract-call? .a3 set_master_contract .bridge))
    (try! (contract-call? .a4 set_master_contract .bridge))
    (try! (contract-call? .a5 set_master_contract .bridge))
    (try! (contract-call? .a6 set_master_contract .bridge))
    (try! (contract-call? .a7 set_master_contract .bridge))
    (try! (contract-call? .a8 set_master_contract .bridge))
    (try! (contract-call? .a9 set_master_contract .bridge))
    (try! (contract-call? .a10 set_master_contract .bridge))
    (try! (contract-call? .a11 set_master_contract .bridge))
    (try! (contract-call? .a12 set_master_contract .bridge))
    (try! (contract-call? .a13 set_master_contract .bridge))
    (try! (contract-call? .a14 set_master_contract .bridge))
    (try! (contract-call? .a15 set_master_contract .bridge))
    (try! (contract-call? .a16 set_master_contract .bridge))
    (try! (contract-call? .a17 set_master_contract .bridge))
    (try! (contract-call? .a18 set_master_contract .bridge))
    (try! (contract-call? .a19 set_master_contract .bridge))
    (try! (contract-call? .a20 set_master_contract .bridge))
    (try! (contract-call? .a21 set_master_contract .bridge))
    (try! (contract-call? .a22 set_master_contract .bridge))
    (try! (contract-call? .a23 set_master_contract .bridge))
    (try! (contract-call? .a24 set_master_contract .bridge))
    (try! (contract-call? .a25 set_master_contract .bridge))
    (try! (contract-call? .a26 set_master_contract .bridge))
    (try! (contract-call? .a27 set_master_contract .bridge))
    (try! (contract-call? .a28 set_master_contract .bridge))
    (try! (contract-call? .a29 set_master_contract .bridge))
    (try! (contract-call? .a30 set_master_contract .bridge))
    (try! (contract-call? .a31 set_master_contract .bridge))
    (try! (contract-call? .a32 set_master_contract .bridge))
    (try! (contract-call? .a33 set_master_contract .bridge))
    (try! (contract-call? .a34 set_master_contract .bridge))
    (try! (contract-call? .a35 set_master_contract .bridge))
    (try! (contract-call? .a36 set_master_contract .bridge))
    (try! (contract-call? .a37 set_master_contract .bridge))
    (try! (contract-call? .a38 set_master_contract .bridge))
    (try! (contract-call? .a39 set_master_contract .bridge))
    (try! (contract-call? .a40 set_master_contract .bridge))
    (try! (contract-call? .a41 set_master_contract .bridge))
    (try! (contract-call? .a42 set_master_contract .bridge))
    (try! (contract-call? .a43 set_master_contract .bridge))
    (try! (contract-call? .a44 set_master_contract .bridge))
    (try! (contract-call? .a45 set_master_contract .bridge))
    (try! (contract-call? .a46 set_master_contract .bridge))
    (try! (contract-call? .a47 set_master_contract .bridge))
    (try! (contract-call? .a48 set_master_contract .bridge))
    (try! (contract-call? .a49 set_master_contract .bridge))
    (try! (contract-call? .a50 set_master_contract .bridge))
    (try! (contract-call? .a51 set_master_contract .bridge))
    (try! (contract-call? .a52 set_master_contract .bridge))
    (try! (contract-call? .a53 set_master_contract .bridge))
    (try! (contract-call? .a54 set_master_contract .bridge))
    (try! (contract-call? .a55 set_master_contract .bridge))
    (try! (contract-call? .a56 set_master_contract .bridge))
    (try! (contract-call? .a57 set_master_contract .bridge))
    (try! (contract-call? .a58 set_master_contract .bridge))
    (try! (contract-call? .a59 set_master_contract .bridge))
    (try! (contract-call? .a60 set_master_contract .bridge))
    (try! (contract-call? .a61 set_master_contract .bridge))
    (try! (contract-call? .a62 set_master_contract .bridge))
    (try! (contract-call? .a63 set_master_contract .bridge))
    (try! (contract-call? .a64 set_master_contract .bridge))
    (try! (contract-call? .a65 set_master_contract .bridge))
    (try! (contract-call? .a66 set_master_contract .bridge))
    (try! (contract-call? .a67 set_master_contract .bridge))
    (try! (contract-call? .a68 set_master_contract .bridge))
    (try! (contract-call? .a69 set_master_contract .bridge))
    (try! (contract-call? .a70 set_master_contract .bridge))
    (try! (contract-call? .a71 set_master_contract .bridge))
    (try! (contract-call? .a72 set_master_contract .bridge))
    (try! (contract-call? .a73 set_master_contract .bridge))
    (try! (contract-call? .a74 set_master_contract .bridge))
    (try! (contract-call? .a75 set_master_contract .bridge))
    (try! (contract-call? .a76 set_master_contract .bridge))
    (try! (contract-call? .a77 set_master_contract .bridge))
    (try! (contract-call? .a78 set_master_contract .bridge))
    (try! (contract-call? .a79 set_master_contract .bridge))
    (try! (contract-call? .a80 set_master_contract .bridge))
    (try! (contract-call? .a81 set_master_contract .bridge))
    (try! (contract-call? .a82 set_master_contract .bridge))
    (try! (contract-call? .a83 set_master_contract .bridge))
    (try! (contract-call? .a84 set_master_contract .bridge))
    (try! (contract-call? .a85 set_master_contract .bridge))
    (try! (contract-call? .a86 set_master_contract .bridge))
    (try! (contract-call? .a87 set_master_contract .bridge))
    (try! (contract-call? .a88 set_master_contract .bridge))
    (try! (contract-call? .a89 set_master_contract .bridge))
    (try! (contract-call? .a90 set_master_contract .bridge))
    (try! (contract-call? .a91 set_master_contract .bridge))
    (try! (contract-call? .a92 set_master_contract .bridge))
    (try! (contract-call? .a93 set_master_contract .bridge))
    (try! (contract-call? .a94 set_master_contract .bridge))
    (try! (contract-call? .a95 set_master_contract .bridge))
    (try! (contract-call? .a96 set_master_contract .bridge))
    (try! (contract-call? .a97 set_master_contract .bridge))
    (try! (contract-call? .a98 set_master_contract .bridge))
    (try! (contract-call? .a99 set_master_contract .bridge))
    (try! (contract-call? .a100 set_master_contract .bridge))
    (try! (contract-call? .a101 set_master_contract .bridge))
    (try! (contract-call? .a102 set_master_contract .bridge))
    (try! (contract-call? .a103 set_master_contract .bridge))
    (try! (contract-call? .a104 set_master_contract .bridge))
    (try! (contract-call? .a105 set_master_contract .bridge))
    (try! (contract-call? .a106 set_master_contract .bridge))
    (try! (contract-call? .a107 set_master_contract .bridge))
    (try! (contract-call? .a108 set_master_contract .bridge))
    (try! (contract-call? .a109 set_master_contract .bridge))
    (try! (contract-call? .a110 set_master_contract .bridge))
    (try! (contract-call? .a111 set_master_contract .bridge))
    (try! (contract-call? .a112 set_master_contract .bridge))
    (try! (contract-call? .a113 set_master_contract .bridge))
    (try! (contract-call? .a114 set_master_contract .bridge))
    (try! (contract-call? .a115 set_master_contract .bridge))
    (try! (contract-call? .a116 set_master_contract .bridge))
    (try! (contract-call? .a117 set_master_contract .bridge))
    (try! (contract-call? .a118 set_master_contract .bridge))
    (try! (contract-call? .a119 set_master_contract .bridge))
    (try! (contract-call? .a120 set_master_contract .bridge))
    (try! (contract-call? .a121 set_master_contract .bridge))
    (try! (contract-call? .a122 set_master_contract .bridge))
    (try! (contract-call? .a123 set_master_contract .bridge))
    (try! (contract-call? .a124 set_master_contract .bridge))
    (try! (contract-call? .a125 set_master_contract .bridge))
    (try! (contract-call? .a126 set_master_contract .bridge))
    (try! (contract-call? .a127 set_master_contract .bridge))
    (try! (contract-call? .a128 set_master_contract .bridge))
    (try! (contract-call? .a129 set_master_contract .bridge))
    (try! (contract-call? .a130 set_master_contract .bridge))
    (try! (contract-call? .a131 set_master_contract .bridge))
    (try! (contract-call? .a132 set_master_contract .bridge))
    (try! (contract-call? .a133 set_master_contract .bridge))
    (try! (contract-call? .a134 set_master_contract .bridge))
    (try! (contract-call? .a135 set_master_contract .bridge))
    (try! (contract-call? .a136 set_master_contract .bridge))
    (try! (contract-call? .a137 set_master_contract .bridge))
    (try! (contract-call? .a138 set_master_contract .bridge))
    (try! (contract-call? .a139 set_master_contract .bridge))
    (try! (contract-call? .a140 set_master_contract .bridge))
    (try! (contract-call? .a141 set_master_contract .bridge))
    (try! (contract-call? .a142 set_master_contract .bridge))
    (try! (contract-call? .a143 set_master_contract .bridge))
    (try! (contract-call? .a144 set_master_contract .bridge))
    (try! (contract-call? .a145 set_master_contract .bridge))
    (try! (contract-call? .a146 set_master_contract .bridge))
    (try! (contract-call? .a147 set_master_contract .bridge))
    (try! (contract-call? .a148 set_master_contract .bridge))
    (try! (contract-call? .a149 set_master_contract .bridge))
    (try! (contract-call? .a150 set_master_contract .bridge))
    (try! (contract-call? .a151 set_master_contract .bridge))
    (try! (contract-call? .a152 set_master_contract .bridge))
    (try! (contract-call? .a153 set_master_contract .bridge))
    (try! (contract-call? .a154 set_master_contract .bridge))
    (try! (contract-call? .a155 set_master_contract .bridge))
    (try! (contract-call? .a156 set_master_contract .bridge))
    (try! (contract-call? .a157 set_master_contract .bridge))
    (try! (contract-call? .a158 set_master_contract .bridge))
    (try! (contract-call? .a159 set_master_contract .bridge))
    (try! (contract-call? .a160 set_master_contract .bridge))
    (try! (contract-call? .a161 set_master_contract .bridge))
    (try! (contract-call? .a162 set_master_contract .bridge))
    (try! (contract-call? .a163 set_master_contract .bridge))
    (try! (contract-call? .a164 set_master_contract .bridge))
    (try! (contract-call? .a165 set_master_contract .bridge))
    (try! (contract-call? .a166 set_master_contract .bridge))
    (try! (contract-call? .a167 set_master_contract .bridge))
    (try! (contract-call? .a168 set_master_contract .bridge))
    (try! (contract-call? .a169 set_master_contract .bridge))
    (try! (contract-call? .a170 set_master_contract .bridge))
    (try! (contract-call? .a171 set_master_contract .bridge))
    (try! (contract-call? .a172 set_master_contract .bridge))
    (try! (contract-call? .a173 set_master_contract .bridge))
    (try! (contract-call? .a174 set_master_contract .bridge))
    (try! (contract-call? .a175 set_master_contract .bridge))
    (try! (contract-call? .a176 set_master_contract .bridge))
    (try! (contract-call? .a177 set_master_contract .bridge))
    (try! (contract-call? .a178 set_master_contract .bridge))
    (try! (contract-call? .a179 set_master_contract .bridge))
    (try! (contract-call? .a180 set_master_contract .bridge))
    (try! (contract-call? .a181 set_master_contract .bridge))
    (try! (contract-call? .a182 set_master_contract .bridge))
    (try! (contract-call? .a183 set_master_contract .bridge))
    (try! (contract-call? .a184 set_master_contract .bridge))
    (try! (contract-call? .a185 set_master_contract .bridge))
    (try! (contract-call? .a186 set_master_contract .bridge))
    (try! (contract-call? .a187 set_master_contract .bridge))
    (try! (contract-call? .a188 set_master_contract .bridge))
    (try! (contract-call? .a189 set_master_contract .bridge))
    (try! (contract-call? .a190 set_master_contract .bridge))
    (try! (contract-call? .a191 set_master_contract .bridge))
    (try! (contract-call? .a192 set_master_contract .bridge))
    (try! (contract-call? .a193 set_master_contract .bridge))
    (try! (contract-call? .a194 set_master_contract .bridge))
    (try! (contract-call? .a195 set_master_contract .bridge))
    (try! (contract-call? .a196 set_master_contract .bridge))
    (try! (contract-call? .a197 set_master_contract .bridge))
    (try! (contract-call? .a198 set_master_contract .bridge))
    (try! (contract-call? .a199 set_master_contract .bridge))
    (try! (contract-call? .a200 set_master_contract .bridge))
    (try! (contract-call? .a201 set_master_contract .bridge))
    (try! (contract-call? .a202 set_master_contract .bridge))
    (try! (contract-call? .a203 set_master_contract .bridge))
    (try! (contract-call? .a204 set_master_contract .bridge))
    (try! (contract-call? .a205 set_master_contract .bridge))
    (try! (contract-call? .a206 set_master_contract .bridge))
    (try! (contract-call? .a207 set_master_contract .bridge))
    (try! (contract-call? .a208 set_master_contract .bridge))
    (try! (contract-call? .a209 set_master_contract .bridge))
    (try! (contract-call? .a210 set_master_contract .bridge))
    (try! (contract-call? .a211 set_master_contract .bridge))
    (try! (contract-call? .a212 set_master_contract .bridge))
    (try! (contract-call? .a213 set_master_contract .bridge))
    (try! (contract-call? .a214 set_master_contract .bridge))
    (try! (contract-call? .a215 set_master_contract .bridge))
    (try! (contract-call? .a216 set_master_contract .bridge))
    (try! (contract-call? .a217 set_master_contract .bridge))
    (try! (contract-call? .a218 set_master_contract .bridge))
    (try! (contract-call? .a219 set_master_contract .bridge))
    (try! (contract-call? .a220 set_master_contract .bridge))
    (try! (contract-call? .a221 set_master_contract .bridge))
    (try! (contract-call? .a222 set_master_contract .bridge))
    (try! (contract-call? .a223 set_master_contract .bridge))
    (try! (contract-call? .a224 set_master_contract .bridge))
    (try! (contract-call? .a225 set_master_contract .bridge))
    (try! (contract-call? .a226 set_master_contract .bridge))
    (try! (contract-call? .a227 set_master_contract .bridge))
    (try! (contract-call? .a228 set_master_contract .bridge))
    (try! (contract-call? .a229 set_master_contract .bridge))
    (try! (contract-call? .a230 set_master_contract .bridge))
    (try! (contract-call? .a231 set_master_contract .bridge))
    (try! (contract-call? .a232 set_master_contract .bridge))
    (try! (contract-call? .a233 set_master_contract .bridge))
    (try! (contract-call? .a234 set_master_contract .bridge))
    (try! (contract-call? .a235 set_master_contract .bridge))
    (try! (contract-call? .a236 set_master_contract .bridge))
    (try! (contract-call? .a237 set_master_contract .bridge))
    (try! (contract-call? .a238 set_master_contract .bridge))
    (try! (contract-call? .a239 set_master_contract .bridge))
    (try! (contract-call? .a240 set_master_contract .bridge))
    (try! (contract-call? .a241 set_master_contract .bridge))
    (try! (contract-call? .a242 set_master_contract .bridge))
    (try! (contract-call? .a243 set_master_contract .bridge))
    (try! (contract-call? .a244 set_master_contract .bridge))
    (try! (contract-call? .a245 set_master_contract .bridge))
    (try! (contract-call? .a246 set_master_contract .bridge))
    (try! (contract-call? .a247 set_master_contract .bridge))
    (try! (contract-call? .a248 set_master_contract .bridge))
    (try! (contract-call? .a249 set_master_contract .bridge))
    (try! (contract-call? .a250 set_master_contract .bridge))
    (ok true)
  )
)

(set_master_contract .market)
