Repository: 0xSpaceShard/starknet-devnet (language: python)

Issue:
feat request: Built-in UDC contract
If this goes through: https://github.com/OpenZeppelin/cairo-contracts/pull/467,
it would amazing to have a UDC pre-deployed as part of Devnet for the purpose of deploying the first factory contract.
Then, all the rest of the deploys in the test suite can be from the factory contract. \


Discussion / hints:
https://github.com/OpenZeppelin/cairo-contracts/pull/467 UDC PR is about to be merged as it is: https://twitter.com/martriay/status/1578496057813528576

@FabijanC or @Nathan-SL could we have this in devnet as part of the 0.10.1 support release later this month?
Once these contracts are officially released (which will be any moment now), we can start working on support for it

Fix patch:
diff --git a/page/docs/guide/Interaction.md b/page/docs/guide/Interaction.md
index 0796057c6..34d1af3fe 100644
--- a/page/docs/guide/Interaction.md
+++ b/page/docs/guide/Interaction.md
@@ -11,6 +11,7 @@ sidebar_position: 2
   - `call`
   - `declare`
   - `deploy`
+  - `deploy_account`
   - `estimate_fee`
   - `get_block` (currently pending block is not supported)
   - `get_block_traces`
diff --git a/page/docs/guide/development.md b/page/docs/guide/development.md
index a560347ff..995de456b 100644
--- a/page/docs/guide/development.md
+++ b/page/docs/guide/development.md
@@ -1,5 +1,5 @@
 ---
-sidebar_position: 16
+sidebar_position: 17
 ---
 
 # Development
diff --git a/page/docs/guide/devnet-speed-up.md b/page/docs/guide/devnet-speed-up.md
index b25787a9f..836cef7da 100644
--- a/page/docs/guide/devnet-speed-up.md
+++ b/page/docs/guide/devnet-speed-up.md
@@ -1,5 +1,5 @@
 ---
-sidebar_position: 15
+sidebar_position: 16
 ---
 # Devnet speed-up troubleshooting
 
diff --git a/page/docs/guide/udc.md b/page/docs/guide/udc.md
new file mode 100644
index 000000000..69af5af41
--- /dev/null
+++ b/page/docs/guide/udc.md
@@ -0,0 +1,7 @@
+---
+sidebar_position: 15
+---
+
+# UDC
+
+Devnet comes with a [Universal Deployer Contract (UDC)](https://community.starknet.io/t/universal-deployer-contract-proposal/1864) predeployed at `0x25fcb74260022bd8ed7e8d542408941826b53345e478b8303d6f31744838a36`. The implementation used is [OpenZeppelin v0.5.0](https://github.com/OpenZeppelin/cairo-contracts/blob/v0.5.0/src/openzeppelin/utils/presets/UniversalDeployer.cairo)
diff --git a/starknet_devnet/UDC_OZ_0.5.0.json b/starknet_devnet/UDC_OZ_0.5.0.json
new file mode 100644
index 000000000..94b07bbe7
--- /dev/null
+++ b/starknet_devnet/UDC_OZ_0.5.0.json
@@ -0,0 +1,1 @@
+{"abi":[{"data":[{"name":"address","type":"felt"},{"name":"deployer","type":"felt"},{"name":"unique","type":"felt"},{"name":"classHash","type":"felt"},{"name":"calldata_len","type":"felt"},{"name":"calldata","type":"felt*"},{"name":"salt","type":"felt"}],"keys":[],"name":"ContractDeployed","type":"event"},{"inputs":[{"name":"classHash","type":"felt"},{"name":"salt","type":"felt"},{"name":"unique","type":"felt"},{"name":"calldata_len","type":"felt"},{"name":"calldata","type":"felt*"}],"name":"deployContract","outputs":[{"name":"address","type":"felt"}],"type":"function"}],"entry_points_by_type":{"CONSTRUCTOR":[],"EXTERNAL":[{"offset":"0x9b","selector":"0x1987cbd17808b9a23693d4de7e246a443cfe37e6e7fbaeabd7d7e6532b07c3d"}],"L1_HANDLER":[]},"program":{"attributes":[],"builtins":["pedersen","range_check"],"compiler_version":"0.10.0","data":["0x40780017fff7fff","0x1","0x208b7fff7fff7ffe","0x400380007ffb7ffc","0x400380017ffb7ffd","0x482680017ffb8000","0x3","0x480280027ffb8000","0x208b7fff7fff7ffe","0x20780017fff7ffd","0x3","0x208b7fff7fff7ffe","0x480a7ffb7fff8000","0x480a7ffc7fff8000","0x480080007fff8000","0x400080007ffd7fff","0x482480017ffd8001","0x1","0x482480017ffd8001","0x1","0xa0680017fff7ffe","0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffb","0x402a7ffc7ffd7fff","0x208b7fff7fff7ffe","0x480680017fff8000","0x4465706c6f79","0x400280007ff87fff","0x400380017ff87ff9","0x400380027ff87ffa","0x400380037ff87ffb","0x400380047ff87ffc","0x400380057ff87ffd","0x482680017ff88000","0x9","0x480280067ff88000","0x208b7fff7fff7ffe","0x480680017fff8000","0x47657443616c6c657241646472657373","0x400280007ffd7fff","0x482680017ffd8000","0x2","0x480280017ffd8000","0x208b7fff7fff7ffe","0x480680017fff8000","0x456d69744576656e74","0x400280007ff97fff","0x400380017ff97ffa","0x400380027ff97ffb","0x400380037ff97ffc","0x400380047ff97ffd","0x482680017ff98000","0x5","0x208b7fff7fff7ffe","0x40780017fff7fff","0x4","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffca","0x40137fff7fff8000","0x480680017fff8000","0x26b160f10156dea0639bec90696772c640b9706a47f5b8c52ea1abe5858b34d","0x4002800080007fff","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffc4","0x40137fff7fff8001","0x4003800080017ff7","0x4003800180017ff8","0x4003800280017ff9","0x4003800380017ffa","0x4003800480017ffb","0x400380007ff67ffb","0x402780017ff68002","0x1","0x4826800180018000","0x5","0x40297ffb7fff8003","0x4826800180018000","0x5","0x480a7ffc7fff8000","0x480a7ffb7fff8000","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffbb","0x4003800080037ffd","0x4826800180038000","0x1","0x480a7ff57fff8000","0x480680017fff8000","0x1","0x480a80007fff8000","0x4828800180007ffc","0x480a80017fff8000","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffd2","0x480a80027fff8000","0x208b7fff7fff7ffe","0x40780017fff7fff","0x6","0x480a7ff67fff8000","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffc4","0x40137ffe7fff8000","0x40137fff7fff8001","0x482680017ffb8000","0x800000000000011000000000000000000000000000000000000000000000000","0x20680017fff7fff","0xd","0x480a7ff77fff8000","0x480a80017fff8000","0x480a7ffa7fff8000","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff98","0x40137fff7fff8002","0x400780017fff8003","0x0","0x48127ffe7fff8000","0x10780017fff7fff","0x6","0x400b7ffa7fff8002","0x400780017fff8003","0x1","0x480a7ff77fff8000","0x40137fff7fff8004","0x480a80007fff8000","0x480a7ff97fff8000","0x480a80027fff8000","0x480a7ffc7fff8000","0x480a7ffd7fff8000","0x480a80037fff8000","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff9a","0x40137fff7fff8005","0x48127ffe7fff8000","0x480a7ff87fff8000","0x480a80057fff8000","0x480a80017fff8000","0x480a7ffb7fff8000","0x480a7ff97fff8000","0x480a7ffc7fff8000","0x480a7ffd7fff8000","0x480a7ffa7fff8000","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffab","0x48127ffe7fff8000","0x480a80047fff8000","0x48127ffd7fff8000","0x480a80057fff8000","0x208b7fff7fff7ffe","0x40780017fff7fff","0x1","0x4003800080007ffc","0x4826800180008000","0x1","0x480a7ffd7fff8000","0x4828800080007ffe","0x480a80007fff8000","0x208b7fff7fff7ffe","0x480280027ffb8000","0x480280037ffd8000","0x400080007ffe7fff","0x482680017ffd8000","0x4","0x480280037ffd8000","0x48307fff7ffe8000","0x402a7ffd7ffc7fff","0x480280027ffb8000","0x480280007ffb8000","0x480280017ffb8000","0x482480017ffd8000","0x1","0x480280007ffd8000","0x480280017ffd8000","0x480280027ffd8000","0x480280037ffd8000","0x482680017ffd8000","0x4","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffb1","0x48127ffe7fff8000","0x1104800180018000","0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe2","0x48127ff47fff8000","0x48127ff47fff8000","0x48127ffb7fff8000","0x48127ffb7fff8000","0x48127ffb7fff8000","0x208b7fff7fff7ffe"],"hints":{"0":[{"accessible_scopes":["starkware.cairo.common.alloc","starkware.cairo.common.alloc.alloc"],"code":"memory[ap] = segments.add()","flow_tracking_data":{"ap_tracking":{"group":0,"offset":0},"reference_ids":{}}}],"12":[{"accessible_scopes":["starkware.cairo.common.memcpy","starkware.cairo.common.memcpy.memcpy"],"code":"vm_enter_scope({'n': ids.len})","flow_tracking_data":{"ap_tracking":{"group":2,"offset":0},"reference_ids":{"starkware.cairo.common.memcpy.memcpy.len":0}}}],"20":[{"accessible_scopes":["starkware.cairo.common.memcpy","starkware.cairo.common.memcpy.memcpy"],"code":"n -= 1\nids.continue_copying = 1 if n > 0 else 0","flow_tracking_data":{"ap_tracking":{"group":2,"offset":5},"reference_ids":{"starkware.cairo.common.memcpy.memcpy.continue_copying":1}}}],"23":[{"accessible_scopes":["starkware.cairo.common.memcpy","starkware.cairo.common.memcpy.memcpy"],"code":"vm_exit_scope()","flow_tracking_data":{"ap_tracking":{"group":2,"offset":6},"reference_ids":{}}}],"32":[{"accessible_scopes":["starkware.starknet.common.syscalls","starkware.starknet.common.syscalls.deploy"],"code":"syscall_handler.deploy(segments=segments, syscall_ptr=ids.syscall_ptr)","flow_tracking_data":{"ap_tracking":{"group":3,"offset":1},"reference_ids":{"starkware.starknet.common.syscalls.deploy.syscall_ptr":2}}}],"39":[{"accessible_scopes":["starkware.starknet.common.syscalls","starkware.starknet.common.syscalls.get_caller_address"],"code":"syscall_handler.get_caller_address(segments=segments, syscall_ptr=ids.syscall_ptr)","flow_tracking_data":{"ap_tracking":{"group":4,"offset":1},"reference_ids":{"starkware.starknet.common.syscalls.get_caller_address.syscall_ptr":3}}}],"50":[{"accessible_scopes":["starkware.starknet.common.syscalls","starkware.starknet.common.syscalls.emit_event"],"code":"syscall_handler.emit_event(segments=segments, syscall_ptr=ids.syscall_ptr)","flow_tracking_data":{"ap_tracking":{"group":5,"offset":1},"reference_ids":{"starkware.starknet.common.syscalls.emit_event.syscall_ptr":4}}}],"146":[{"accessible_scopes":["__main__","__main__","__wrappers__","__wrappers__.deployContract_encode_return"],"code":"memory[ap] = segments.add()","flow_tracking_data":{"ap_tracking":{"group":11,"offset":0},"reference_ids":{}}}]},"identifiers":{"__main__.ContractDeployed":{"type":"namespace"},"__main__.ContractDeployed.Args":{"full_name":"__main__.ContractDeployed.Args","members":{},"size":0,"type":"struct"},"__main__.ContractDeployed.ImplicitArgs":{"full_name":"__main__.ContractDeployed.ImplicitArgs","members":{},"size":0,"type":"struct"},"__main__.ContractDeployed.Return":{"cairo_type":"()","type":"type_definition"},"__main__.ContractDeployed.SELECTOR":{"type":"const","value":1093830577610461490539113735431936179703456330374563419579920790156759053133},"__main__.ContractDeployed.SIZEOF_LOCALS":{"type":"const","value":0},"__main__.ContractDeployed.alloc":{"destination":"starkware.cairo.common.alloc.alloc","type":"alias"},"__main__.ContractDeployed.emit":{"decorators":[],"pc":53,"type":"function"},"__main__.ContractDeployed.emit.Args":{"full_name":"__main__.ContractDeployed.emit.Args","members":{"address":{"cairo_type":"felt","offset":0},"calldata":{"cairo_type":"felt*","offset":5},"calldata_len":{"cairo_type":"felt","offset":4},"classHash":{"cairo_type":"felt","offset":3},"deployer":{"cairo_type":"felt","offset":1},"salt":{"cairo_type":"felt","offset":6},"unique":{"cairo_type":"felt","offset":2}},"size":7,"type":"struct"},"__main__.ContractDeployed.emit.ImplicitArgs":{"full_name":"__main__.ContractDeployed.emit.ImplicitArgs","members":{"range_check_ptr":{"cairo_type":"felt","offset":1},"syscall_ptr":{"cairo_type":"felt*","offset":0}},"size":2,"type":"struct"},"__main__.ContractDeployed.emit.Return":{"cairo_type":"()","type":"type_definition"},"__main__.ContractDeployed.emit.SIZEOF_LOCALS":{"type":"const","value":4},"__main__.ContractDeployed.emit_event":{"destination":"starkware.starknet.common.syscalls.emit_event","type":"alias"},"__main__.ContractDeployed.memcpy":{"destination":"starkware.cairo.common.memcpy.memcpy","type":"alias"},"__main__.FALSE":{"destination":"starkware.cairo.common.bool.FALSE","type":"alias"},"__main__.HashBuiltin":{"destination":"starkware.cairo.common.cairo_builtins.HashBuiltin","type":"alias"},"__main__.TRUE":{"destination":"starkware.cairo.common.bool.TRUE","type":"alias"},"__main__.deploy":{"destination":"starkware.starknet.common.syscalls.deploy","type":"alias"},"__main__.deployContract":{"decorators":["external"],"pc":94,"type":"function"},"__main__.deployContract.Args":{"full_name":"__main__.deployContract.Args","members":{"calldata":{"cairo_type":"felt*","offset":4},"calldata_len":{"cairo_type":"felt","offset":3},"classHash":{"cairo_type":"felt","offset":0},"salt":{"cairo_type":"felt","offset":1},"unique":{"cairo_type":"felt","offset":2}},"size":5,"type":"struct"},"__main__.deployContract.ImplicitArgs":{"full_name":"__main__.deployContract.ImplicitArgs","members":{"pedersen_ptr":{"cairo_type":"starkware.cairo.common.cairo_builtins.HashBuiltin*","offset":1},"range_check_ptr":{"cairo_type":"felt","offset":2},"syscall_ptr":{"cairo_type":"felt*","offset":0}},"size":3,"type":"struct"},"__main__.deployContract.Return":{"cairo_type":"(address: felt)","type":"type_definition"},"__main__.deployContract.SIZEOF_LOCALS":{"type":"const","value":6},"__main__.get_caller_address":{"destination":"starkware.starknet.common.syscalls.get_caller_address","type":"alias"},"__main__.hash2":{"destination":"starkware.cairo.common.hash.hash2","type":"alias"},"__wrappers__.deployContract":{"decorators":["external"],"pc":155,"type":"function"},"__wrappers__.deployContract.Args":{"full_name":"__wrappers__.deployContract.Args","members":{},"size":0,"type":"struct"},"__wrappers__.deployContract.ImplicitArgs":{"full_name":"__wrappers__.deployContract.ImplicitArgs","members":{},"size":0,"type":"struct"},"__wrappers__.deployContract.Return":{"cairo_type":"(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, size: felt, retdata: felt*)","type":"type_definition"},"__wrappers__.deployContract.SIZEOF_LOCALS":{"type":"const","value":0},"__wrappers__.deployContract.__wrapped_func":{"destination":"__main__.deployContract","type":"alias"},"__wrappers__.deployContract_encode_return":{"decorators":[],"pc":146,"type":"function"},"__wrappers__.deployContract_encode_return.Args":{"full_name":"__wrappers__.deployContract_encode_return.Args","members":{"range_check_ptr":{"cairo_type":"felt","offset":1},"ret_value":{"cairo_type":"(address: felt)","offset":0}},"size":2,"type":"struct"},"__wrappers__.deployContract_encode_return.ImplicitArgs":{"full_name":"__wrappers__.deployContract_encode_return.ImplicitArgs","members":{},"size":0,"type":"struct"},"__wrappers__.deployContract_encode_return.Return":{"cairo_type":"(range_check_ptr: felt, data_len: felt, data: felt*)","type":"type_definition"},"__wrappers__.deployContract_encode_return.SIZEOF_LOCALS":{"type":"const","value":1},"__wrappers__.deployContract_encode_return.memcpy":{"destination":"starkware.cairo.common.memcpy.memcpy","type":"alias"},"starkware.cairo.common.alloc.alloc":{"decorators":[],"pc":0,"type":"function"},"starkware.cairo.common.alloc.alloc.Args":{"full_name":"starkware.cairo.common.alloc.alloc.Args","members":{},"size":0,"type":"struct"},"starkware.cairo.common.alloc.alloc.ImplicitArgs":{"full_name":"starkware.cairo.common.alloc.alloc.ImplicitArgs","members":{},"size":0,"type":"struct"},"starkware.cairo.common.alloc.alloc.Return":{"cairo_type":"(ptr: felt*)","type":"type_definition"},"starkware.cairo.common.alloc.alloc.SIZEOF_LOCALS":{"type":"const","value":0},"starkware.cairo.common.bool.FALSE":{"type":"const","value":0},"starkware.cairo.common.bool.TRUE":{"type":"const","value":1},"starkware.cairo.common.cairo_builtins.BitwiseBuiltin":{"full_name":"starkware.cairo.common.cairo_builtins.BitwiseBuiltin","members":{"x":{"cairo_type":"felt","offset":0},"x_and_y":{"cairo_type":"felt","offset":2},"x_or_y":{"cairo_type":"felt","offset":4},"x_xor_y":{"cairo_type":"felt","offset":3},"y":{"cairo_type":"felt","offset":1}},"size":5,"type":"struct"},"starkware.cairo.common.cairo_builtins.EcOpBuiltin":{"full_name":"starkware.cairo.common.cairo_builtins.EcOpBuiltin","members":{"m":{"cairo_type":"felt","offset":4},"p":{"cairo_type":"starkware.cairo.common.ec_point.EcPoint","offset":0},"q":{"cairo_type":"starkware.cairo.common.ec_point.EcPoint","offset":2},"r":{"cairo_type":"starkware.cairo.common.ec_point.EcPoint","offset":5}},"size":7,"type":"struct"},"starkware.cairo.common.cairo_builtins.EcPoint":{"destination":"starkware.cairo.common.ec_point.EcPoint","type":"alias"},"starkware.cairo.common.cairo_builtins.HashBuiltin":{"full_name":"starkware.cairo.common.cairo_builtins.HashBuiltin","members":{"result":{"cairo_type":"felt","offset":2},"x":{"cairo_type":"felt","offset":0},"y":{"cairo_type":"felt","offset":1}},"size":3,"type":"struct"},"starkware.cairo.common.cairo_builtins.KeccakBuiltin":{"full_name":"starkware.cairo.common.cairo_builtins.KeccakBuiltin","members":{"input":{"cairo_type":"starkware.cairo.common.keccak_state.KeccakBuiltinState","offset":0},"output":{"cairo_type":"starkware.cairo.common.keccak_state.KeccakBuiltinState","offset":8}},"size":16,"type":"struct"},"starkware.cairo.common.cairo_builtins.KeccakBuiltinState":{"destination":"starkware.cairo.common.keccak_state.KeccakBuiltinState","type":"alias"},"starkware.cairo.common.cairo_builtins.SignatureBuiltin":{"full_name":"starkware.cairo.common.cairo_builtins.SignatureBuiltin","members":{"message":{"cairo_type":"felt","offset":1},"pub_key":{"cairo_type":"felt","offset":0}},"size":2,"type":"struct"},"starkware.cairo.common.dict_access.DictAccess":{"full_name":"starkware.cairo.common.dict_access.DictAccess","members":{"key":{"cairo_type":"felt","offset":0},"new_value":{"cairo_type":"felt","offset":2},"prev_value":{"cairo_type":"felt","offset":1}},"size":3,"type":"struct"},"starkware.cairo.common.ec_point.EcPoint":{"full_name":"starkware.cairo.common.ec_point.EcPoint","members":{"x":{"cairo_type":"felt","offset":0},"y":{"cairo_type":"felt","offset":1}},"size":2,"type":"struct"},"starkware.cairo.common.hash.HashBuiltin":{"destination":"starkware.cairo.common.cairo_builtins.HashBuiltin","type":"alias"},"starkware.cairo.common.hash.hash2":{"decorators":[],"pc":3,"type":"function"},"starkware.cairo.common.hash.hash2.Args":{"full_name":"starkware.cairo.common.hash.hash2.Args","members":{"x":{"cairo_type":"felt","offset":0},"y":{"cairo_type":"felt","offset":1}},"size":2,"type":"struct"},"starkware.cairo.common.hash.hash2.ImplicitArgs":{"full_name":"starkware.cairo.common.hash.hash2.ImplicitArgs","members":{"hash_ptr":{"cairo_type":"starkware.cairo.common.cairo_builtins.HashBuiltin*","offset":0}},"size":1,"type":"struct"},"starkware.cairo.common.hash.hash2.Return":{"cairo_type":"(result: felt)","type":"type_definition"},"starkware.cairo.common.hash.hash2.SIZEOF_LOCALS":{"type":"const","value":0},"starkware.cairo.common.keccak_state.KeccakBuiltinState":{"full_name":"starkware.cairo.common.keccak_state.KeccakBuiltinState","members":{"s0":{"cairo_type":"felt","offset":0},"s1":{"cairo_type":"felt","offset":1},"s2":{"cairo_type":"felt","offset":2},"s3":{"cairo_type":"felt","offset":3},"s4":{"cairo_type":"felt","offset":4},"s5":{"cairo_type":"felt","offset":5},"s6":{"cairo_type":"felt","offset":6},"s7":{"cairo_type":"felt","offset":7}},"size":8,"type":"struct"},"starkware.cairo.common.math.FALSE":{"destination":"starkware.cairo.common.bool.FALSE","type":"alias"},"starkware.cairo.common.math.TRUE":{"destination":"starkware.cairo.common.bool.TRUE","type":"alias"},"starkware.cairo.common.memcpy.memcpy":{"decorators":[],"pc":9,"type":"function"},"starkware.cairo.common.memcpy.memcpy.Args":{"full_name":"starkware.cairo.common.memcpy.memcpy.Args","members":{"dst":{"cairo_type":"felt*","offset":0},"len":{"cairo_type":"felt","offset":2},"src":{"cairo_type":"felt*","offset":1}},"size":3,"type":"struct"},"starkware.cairo.common.memcpy.memcpy.ImplicitArgs":{"full_name":"starkware.cairo.common.memcpy.memcpy.ImplicitArgs","members":{},"size":0,"type":"struct"},"starkware.cairo.common.memcpy.memcpy.LoopFrame":{"full_name":"starkware.cairo.common.memcpy.memcpy.LoopFrame","members":{"dst":{"cairo_type":"felt*","offset":0},"src":{"cairo_type":"felt*","offset":1}},"size":2,"type":"struct"},"starkware.cairo.common.memcpy.memcpy.Return":{"cairo_type":"()","type":"type_definition"},"starkware.cairo.common.memcpy.memcpy.SIZEOF_LOCALS":{"type":"const","value":0},"starkware.cairo.common.memcpy.memcpy.continue_copying":{"cairo_type":"felt","full_name":"starkware.cairo.common.memcpy.memcpy.continue_copying","references":[{"ap_tracking_data":{"group":2,"offset":3},"pc":16,"value":"[cast(ap, felt*)]"}],"type":"reference"},"starkware.cairo.common.memcpy.memcpy.len":{"cairo_type":"felt","full_name":"starkware.cairo.common.memcpy.memcpy.len","references":[{"ap_tracking_data":{"group":2,"offset":0},"pc":9,"value":"[cast(fp + (-3), felt*)]"}],"type":"reference"},"starkware.cairo.common.memcpy.memcpy.loop":{"pc":14,"type":"label"},"starkware.starknet.common.storage.ADDR_BOUND":{"type":"const","value":-106710729501573572985208420194530329073740042555888586719489},"starkware.starknet.common.storage.MAX_STORAGE_ITEM_SIZE":{"type":"const","value":256},"starkware.starknet.common.storage.assert_250_bit":{"destination":"starkware.cairo.common.math.assert_250_bit","type":"alias"},"starkware.starknet.common.syscalls.CALL_CONTRACT_SELECTOR":{"type":"const","value":20853273475220472486191784820},"starkware.starknet.common.syscalls.CallContract":{"full_name":"starkware.starknet.common.syscalls.CallContract","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.CallContractRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.CallContractResponse","offset":5}},"size":7,"type":"struct"},"starkware.starknet.common.syscalls.CallContractRequest":{"full_name":"starkware.starknet.common.syscalls.CallContractRequest","members":{"calldata":{"cairo_type":"felt*","offset":4},"calldata_size":{"cairo_type":"felt","offset":3},"contract_address":{"cairo_type":"felt","offset":1},"function_selector":{"cairo_type":"felt","offset":2},"selector":{"cairo_type":"felt","offset":0}},"size":5,"type":"struct"},"starkware.starknet.common.syscalls.CallContractResponse":{"full_name":"starkware.starknet.common.syscalls.CallContractResponse","members":{"retdata":{"cairo_type":"felt*","offset":1},"retdata_size":{"cairo_type":"felt","offset":0}},"size":2,"type":"struct"},"starkware.starknet.common.syscalls.DELEGATE_CALL_SELECTOR":{"type":"const","value":21167594061783206823196716140},"starkware.starknet.common.syscalls.DELEGATE_L1_HANDLER_SELECTOR":{"type":"const","value":23274015802972845247556842986379118667122},"starkware.starknet.common.syscalls.DEPLOY_SELECTOR":{"type":"const","value":75202468540281},"starkware.starknet.common.syscalls.Deploy":{"full_name":"starkware.starknet.common.syscalls.Deploy","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.DeployRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.DeployResponse","offset":6}},"size":9,"type":"struct"},"starkware.starknet.common.syscalls.DeployRequest":{"full_name":"starkware.starknet.common.syscalls.DeployRequest","members":{"class_hash":{"cairo_type":"felt","offset":1},"constructor_calldata":{"cairo_type":"felt*","offset":4},"constructor_calldata_size":{"cairo_type":"felt","offset":3},"contract_address_salt":{"cairo_type":"felt","offset":2},"deploy_from_zero":{"cairo_type":"felt","offset":5},"selector":{"cairo_type":"felt","offset":0}},"size":6,"type":"struct"},"starkware.starknet.common.syscalls.DeployResponse":{"full_name":"starkware.starknet.common.syscalls.DeployResponse","members":{"constructor_retdata":{"cairo_type":"felt*","offset":2},"constructor_retdata_size":{"cairo_type":"felt","offset":1},"contract_address":{"cairo_type":"felt","offset":0}},"size":3,"type":"struct"},"starkware.starknet.common.syscalls.DictAccess":{"destination":"starkware.cairo.common.dict_access.DictAccess","type":"alias"},"starkware.starknet.common.syscalls.EMIT_EVENT_SELECTOR":{"type":"const","value":1280709301550335749748},"starkware.starknet.common.syscalls.EmitEvent":{"full_name":"starkware.starknet.common.syscalls.EmitEvent","members":{"data":{"cairo_type":"felt*","offset":4},"data_len":{"cairo_type":"felt","offset":3},"keys":{"cairo_type":"felt*","offset":2},"keys_len":{"cairo_type":"felt","offset":1},"selector":{"cairo_type":"felt","offset":0}},"size":5,"type":"struct"},"starkware.starknet.common.syscalls.GET_BLOCK_NUMBER_SELECTOR":{"type":"const","value":1448089106835523001438702345020786},"starkware.starknet.common.syscalls.GET_BLOCK_TIMESTAMP_SELECTOR":{"type":"const","value":24294903732626645868215235778792757751152},"starkware.starknet.common.syscalls.GET_CALLER_ADDRESS_SELECTOR":{"type":"const","value":94901967781393078444254803017658102643},"starkware.starknet.common.syscalls.GET_CONTRACT_ADDRESS_SELECTOR":{"type":"const","value":6219495360805491471215297013070624192820083},"starkware.starknet.common.syscalls.GET_SEQUENCER_ADDRESS_SELECTOR":{"type":"const","value":1592190833581991703053805829594610833820054387},"starkware.starknet.common.syscalls.GET_TX_INFO_SELECTOR":{"type":"const","value":1317029390204112103023},"starkware.starknet.common.syscalls.GET_TX_SIGNATURE_SELECTOR":{"type":"const","value":1448089128652340074717162277007973},"starkware.starknet.common.syscalls.GetBlockNumber":{"full_name":"starkware.starknet.common.syscalls.GetBlockNumber","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.GetBlockNumberRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.GetBlockNumberResponse","offset":1}},"size":2,"type":"struct"},"starkware.starknet.common.syscalls.GetBlockNumberRequest":{"full_name":"starkware.starknet.common.syscalls.GetBlockNumberRequest","members":{"selector":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetBlockNumberResponse":{"full_name":"starkware.starknet.common.syscalls.GetBlockNumberResponse","members":{"block_number":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetBlockTimestamp":{"full_name":"starkware.starknet.common.syscalls.GetBlockTimestamp","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.GetBlockTimestampRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.GetBlockTimestampResponse","offset":1}},"size":2,"type":"struct"},"starkware.starknet.common.syscalls.GetBlockTimestampRequest":{"full_name":"starkware.starknet.common.syscalls.GetBlockTimestampRequest","members":{"selector":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetBlockTimestampResponse":{"full_name":"starkware.starknet.common.syscalls.GetBlockTimestampResponse","members":{"block_timestamp":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetCallerAddress":{"full_name":"starkware.starknet.common.syscalls.GetCallerAddress","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.GetCallerAddressRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.GetCallerAddressResponse","offset":1}},"size":2,"type":"struct"},"starkware.starknet.common.syscalls.GetCallerAddressRequest":{"full_name":"starkware.starknet.common.syscalls.GetCallerAddressRequest","members":{"selector":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetCallerAddressResponse":{"full_name":"starkware.starknet.common.syscalls.GetCallerAddressResponse","members":{"caller_address":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetContractAddress":{"full_name":"starkware.starknet.common.syscalls.GetContractAddress","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.GetContractAddressRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.GetContractAddressResponse","offset":1}},"size":2,"type":"struct"},"starkware.starknet.common.syscalls.GetContractAddressRequest":{"full_name":"starkware.starknet.common.syscalls.GetContractAddressRequest","members":{"selector":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetContractAddressResponse":{"full_name":"starkware.starknet.common.syscalls.GetContractAddressResponse","members":{"contract_address":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetSequencerAddress":{"full_name":"starkware.starknet.common.syscalls.GetSequencerAddress","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.GetSequencerAddressRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.GetSequencerAddressResponse","offset":1}},"size":2,"type":"struct"},"starkware.starknet.common.syscalls.GetSequencerAddressRequest":{"full_name":"starkware.starknet.common.syscalls.GetSequencerAddressRequest","members":{"selector":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetSequencerAddressResponse":{"full_name":"starkware.starknet.common.syscalls.GetSequencerAddressResponse","members":{"sequencer_address":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetTxInfo":{"full_name":"starkware.starknet.common.syscalls.GetTxInfo","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.GetTxInfoRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.GetTxInfoResponse","offset":1}},"size":2,"type":"struct"},"starkware.starknet.common.syscalls.GetTxInfoRequest":{"full_name":"starkware.starknet.common.syscalls.GetTxInfoRequest","members":{"selector":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetTxInfoResponse":{"full_name":"starkware.starknet.common.syscalls.GetTxInfoResponse","members":{"tx_info":{"cairo_type":"starkware.starknet.common.syscalls.TxInfo*","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetTxSignature":{"full_name":"starkware.starknet.common.syscalls.GetTxSignature","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.GetTxSignatureRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.GetTxSignatureResponse","offset":1}},"size":3,"type":"struct"},"starkware.starknet.common.syscalls.GetTxSignatureRequest":{"full_name":"starkware.starknet.common.syscalls.GetTxSignatureRequest","members":{"selector":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.GetTxSignatureResponse":{"full_name":"starkware.starknet.common.syscalls.GetTxSignatureResponse","members":{"signature":{"cairo_type":"felt*","offset":1},"signature_len":{"cairo_type":"felt","offset":0}},"size":2,"type":"struct"},"starkware.starknet.common.syscalls.LIBRARY_CALL_L1_HANDLER_SELECTOR":{"type":"const","value":436233452754198157705746250789557519228244616562},"starkware.starknet.common.syscalls.LIBRARY_CALL_SELECTOR":{"type":"const","value":92376026794327011772951660},"starkware.starknet.common.syscalls.LibraryCall":{"full_name":"starkware.starknet.common.syscalls.LibraryCall","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.LibraryCallRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.CallContractResponse","offset":5}},"size":7,"type":"struct"},"starkware.starknet.common.syscalls.LibraryCallRequest":{"full_name":"starkware.starknet.common.syscalls.LibraryCallRequest","members":{"calldata":{"cairo_type":"felt*","offset":4},"calldata_size":{"cairo_type":"felt","offset":3},"class_hash":{"cairo_type":"felt","offset":1},"function_selector":{"cairo_type":"felt","offset":2},"selector":{"cairo_type":"felt","offset":0}},"size":5,"type":"struct"},"starkware.starknet.common.syscalls.SEND_MESSAGE_TO_L1_SELECTOR":{"type":"const","value":433017908768303439907196859243777073},"starkware.starknet.common.syscalls.STORAGE_READ_SELECTOR":{"type":"const","value":100890693370601760042082660},"starkware.starknet.common.syscalls.STORAGE_WRITE_SELECTOR":{"type":"const","value":25828017502874050592466629733},"starkware.starknet.common.syscalls.SendMessageToL1SysCall":{"full_name":"starkware.starknet.common.syscalls.SendMessageToL1SysCall","members":{"payload_ptr":{"cairo_type":"felt*","offset":3},"payload_size":{"cairo_type":"felt","offset":2},"selector":{"cairo_type":"felt","offset":0},"to_address":{"cairo_type":"felt","offset":1}},"size":4,"type":"struct"},"starkware.starknet.common.syscalls.StorageRead":{"full_name":"starkware.starknet.common.syscalls.StorageRead","members":{"request":{"cairo_type":"starkware.starknet.common.syscalls.StorageReadRequest","offset":0},"response":{"cairo_type":"starkware.starknet.common.syscalls.StorageReadResponse","offset":2}},"size":3,"type":"struct"},"starkware.starknet.common.syscalls.StorageReadRequest":{"full_name":"starkware.starknet.common.syscalls.StorageReadRequest","members":{"address":{"cairo_type":"felt","offset":1},"selector":{"cairo_type":"felt","offset":0}},"size":2,"type":"struct"},"starkware.starknet.common.syscalls.StorageReadResponse":{"full_name":"starkware.starknet.common.syscalls.StorageReadResponse","members":{"value":{"cairo_type":"felt","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.StorageWrite":{"full_name":"starkware.starknet.common.syscalls.StorageWrite","members":{"address":{"cairo_type":"felt","offset":1},"selector":{"cairo_type":"felt","offset":0},"value":{"cairo_type":"felt","offset":2}},"size":3,"type":"struct"},"starkware.starknet.common.syscalls.TxInfo":{"full_name":"starkware.starknet.common.syscalls.TxInfo","members":{"account_contract_address":{"cairo_type":"felt","offset":1},"chain_id":{"cairo_type":"felt","offset":6},"max_fee":{"cairo_type":"felt","offset":2},"nonce":{"cairo_type":"felt","offset":7},"signature":{"cairo_type":"felt*","offset":4},"signature_len":{"cairo_type":"felt","offset":3},"transaction_hash":{"cairo_type":"felt","offset":5},"version":{"cairo_type":"felt","offset":0}},"size":8,"type":"struct"},"starkware.starknet.common.syscalls.deploy":{"decorators":[],"pc":24,"type":"function"},"starkware.starknet.common.syscalls.deploy.Args":{"full_name":"starkware.starknet.common.syscalls.deploy.Args","members":{"class_hash":{"cairo_type":"felt","offset":0},"constructor_calldata":{"cairo_type":"felt*","offset":3},"constructor_calldata_size":{"cairo_type":"felt","offset":2},"contract_address_salt":{"cairo_type":"felt","offset":1},"deploy_from_zero":{"cairo_type":"felt","offset":4}},"size":5,"type":"struct"},"starkware.starknet.common.syscalls.deploy.ImplicitArgs":{"full_name":"starkware.starknet.common.syscalls.deploy.ImplicitArgs","members":{"syscall_ptr":{"cairo_type":"felt*","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.deploy.Return":{"cairo_type":"(contract_address: felt)","type":"type_definition"},"starkware.starknet.common.syscalls.deploy.SIZEOF_LOCALS":{"type":"const","value":0},"starkware.starknet.common.syscalls.deploy.syscall_ptr":{"cairo_type":"felt*","full_name":"starkware.starknet.common.syscalls.deploy.syscall_ptr","references":[{"ap_tracking_data":{"group":3,"offset":0},"pc":24,"value":"[cast(fp + (-8), felt**)]"},{"ap_tracking_data":{"group":3,"offset":1},"pc":32,"value":"cast([fp + (-8)] + 9, felt*)"}],"type":"reference"},"starkware.starknet.common.syscalls.emit_event":{"decorators":[],"pc":43,"type":"function"},"starkware.starknet.common.syscalls.emit_event.Args":{"full_name":"starkware.starknet.common.syscalls.emit_event.Args","members":{"data":{"cairo_type":"felt*","offset":3},"data_len":{"cairo_type":"felt","offset":2},"keys":{"cairo_type":"felt*","offset":1},"keys_len":{"cairo_type":"felt","offset":0}},"size":4,"type":"struct"},"starkware.starknet.common.syscalls.emit_event.ImplicitArgs":{"full_name":"starkware.starknet.common.syscalls.emit_event.ImplicitArgs","members":{"syscall_ptr":{"cairo_type":"felt*","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.emit_event.Return":{"cairo_type":"()","type":"type_definition"},"starkware.starknet.common.syscalls.emit_event.SIZEOF_LOCALS":{"type":"const","value":0},"starkware.starknet.common.syscalls.emit_event.syscall_ptr":{"cairo_type":"felt*","full_name":"starkware.starknet.common.syscalls.emit_event.syscall_ptr","references":[{"ap_tracking_data":{"group":5,"offset":0},"pc":43,"value":"[cast(fp + (-7), felt**)]"},{"ap_tracking_data":{"group":5,"offset":1},"pc":50,"value":"cast([fp + (-7)] + 5, felt*)"}],"type":"reference"},"starkware.starknet.common.syscalls.get_caller_address":{"decorators":[],"pc":36,"type":"function"},"starkware.starknet.common.syscalls.get_caller_address.Args":{"full_name":"starkware.starknet.common.syscalls.get_caller_address.Args","members":{},"size":0,"type":"struct"},"starkware.starknet.common.syscalls.get_caller_address.ImplicitArgs":{"full_name":"starkware.starknet.common.syscalls.get_caller_address.ImplicitArgs","members":{"syscall_ptr":{"cairo_type":"felt*","offset":0}},"size":1,"type":"struct"},"starkware.starknet.common.syscalls.get_caller_address.Return":{"cairo_type":"(caller_address: felt)","type":"type_definition"},"starkware.starknet.common.syscalls.get_caller_address.SIZEOF_LOCALS":{"type":"const","value":0},"starkware.starknet.common.syscalls.get_caller_address.syscall_ptr":{"cairo_type":"felt*","full_name":"starkware.starknet.common.syscalls.get_caller_address.syscall_ptr","references":[{"ap_tracking_data":{"group":4,"offset":0},"pc":36,"value":"[cast(fp + (-3), felt**)]"},{"ap_tracking_data":{"group":4,"offset":1},"pc":39,"value":"cast([fp + (-3)] + 2, felt*)"}],"type":"reference"}},"main_scope":"__main__","prime":"0x800000000000011000000000000000000000000000000000000000000000001","reference_manager":{"references":[{"ap_tracking_data":{"group":2,"offset":0},"pc":9,"value":"[cast(fp + (-3), felt*)]"},{"ap_tracking_data":{"group":2,"offset":3},"pc":16,"value":"[cast(ap, felt*)]"},{"ap_tracking_data":{"group":3,"offset":0},"pc":24,"value":"[cast(fp + (-8), felt**)]"},{"ap_tracking_data":{"group":4,"offset":0},"pc":36,"value":"[cast(fp + (-3), felt**)]"},{"ap_tracking_data":{"group":5,"offset":0},"pc":43,"value":"[cast(fp + (-7), felt**)]"}]}}}
\ No newline at end of file
diff --git a/starknet_devnet/constants.py b/starknet_devnet/constants.py
index 3175f0a54..10c7549c1 100644
--- a/starknet_devnet/constants.py
+++ b/starknet_devnet/constants.py
@@ -28,6 +28,7 @@
 
 OLD_SUPPORTED_VERSIONS = [0]
 
+# account used by StarkNet CLI
 OZ_ACCOUNT_CLASS_HASH = (
     895370652103566112291566439803611591116951595367594863638369163604569619773
 )
diff --git a/starknet_devnet/fee_token.py b/starknet_devnet/fee_token.py
index 54ef55ab3..91906d24e 100644
--- a/starknet_devnet/fee_token.py
+++ b/starknet_devnet/fee_token.py
@@ -26,7 +26,7 @@ class FeeToken:
 
     # Precalculated to fixed address
     # ADDRESS = calculate_contract_address_from_hash(salt=10, class_hash=HASH,
-    # constructor_calldata=[], caller_address=0)
+    # constructor_calldata=[], deployer_address=0)
     ADDRESS = (
         2774287484619332564597403632816768868845110259953541691709975889937073775752
     )
diff --git a/starknet_devnet/starknet_wrapper.py b/starknet_devnet/starknet_wrapper.py
index 53f481987..c0db74529 100644
--- a/starknet_devnet/starknet_wrapper.py
+++ b/starknet_devnet/starknet_wrapper.py
@@ -67,6 +67,7 @@
 from .fee_token import FeeToken
 from .general_config import DEFAULT_GENERAL_CONFIG
 from .origin import NullOrigin, Origin
+from .udc import UDC
 from .util import (
     StarknetDevnetException,
     enable_pickling,
@@ -106,6 +107,7 @@ def __init__(self, config: DevnetConfig):
         self.__initialized = False
         self.fee_token = FeeToken(self)
         self.accounts = Accounts(self)
+        self.__udc = UDC(self)
 
         if config.start_time is not None:
             self.set_block_time(config.start_time)
@@ -126,6 +128,7 @@ async def initialize(self):
             await self.fee_token.deploy()
             await self.accounts.deploy()
             await self.__predeclare_oz_account()
+            await self.__udc.deploy()
 
             await self.__preserve_current_state(starknet.state.state)
             await self.create_empty_block()
diff --git a/starknet_devnet/udc.py b/starknet_devnet/udc.py
new file mode 100644
index 000000000..dfea5b327
--- /dev/null
+++ b/starknet_devnet/udc.py
@@ -0,0 +1,58 @@
+"""UDC and its constants"""
+
+from starkware.python.utils import to_bytes
+from starkware.solidity.utils import load_nearby_contract
+from starkware.starknet.services.api.contract_class import ContractClass
+from starkware.starknet.testing.contract import StarknetContract
+from starkware.starknet.testing.starknet import Starknet
+
+
+class UDC:
+    """UDC wrapper class"""
+
+    CONTRACT_CLASS: ContractClass = None  # loaded lazily
+
+    # Precalculated
+    # HASH = to_bytes(compute_class_hash(contract_class=UDC.get_contract_class()))
+    HASH = 3484004124736344420122298338254154090450773688458934993781007232228755339881
+    HASH_BYTES = to_bytes(HASH)
+
+    # Precalculated to fixed address
+    # ADDRESS = calculate_contract_address_from_hash(salt=10, class_hash=HASH,
+    # constructor_calldata=[], deployer_address=0)
+    ADDRESS = (
+        1073880354184614071153542798898672284640862493126523554954769603345737026102
+    )
+
+    contract: StarknetContract = None
+
+    def __init__(self, starknet_wrapper):
+        self.starknet_wrapper = starknet_wrapper
+
+    @classmethod
+    def get_contract_class(cls):
+        """Returns contract class via lazy loading."""
+        if not cls.CONTRACT_CLASS:
+            cls.CONTRACT_CLASS = ContractClass.load(
+                load_nearby_contract("UDC_OZ_0.5.0")
+            )
+        return cls.CONTRACT_CLASS
+
+    async def deploy(self):
+        """Deploy token contract for charging fees."""
+        starknet: Starknet = self.starknet_wrapper.starknet
+        contract_class = UDC.get_contract_class()
+
+        await starknet.state.state.set_contract_class(UDC.HASH_BYTES, contract_class)
+        await starknet.state.state.deploy_contract(UDC.ADDRESS, UDC.HASH_BYTES)
+
+        self.contract = StarknetContract(
+            state=starknet.state,
+            abi=contract_class.abi,
+            contract_address=UDC.ADDRESS,
+            deploy_call_info=None,
+        )
+
+        await self.starknet_wrapper.store_contract(
+            UDC.ADDRESS, self.contract, contract_class
+        )


Test patch:
diff --git a/test/shared.py b/test/shared.py
index 01a6ec855..5b71e4dd9 100644
--- a/test/shared.py
+++ b/test/shared.py
@@ -62,3 +62,6 @@
 EXPECTED_FEE_TOKEN_ADDRESS = (
     "0x62230ea046a9a5fbc261ac77d03c8d41e5d442db2284587570ab46455fd2488"
 )
+EXPECTED_UDC_ADDRESS = (
+    "0x25fcb74260022bd8ed7e8d542408941826b53345e478b8303d6f31744838a36"
+)
diff --git a/test/test_declare.py b/test/test_declare.py
index b24e5165e..64a007a14 100644
--- a/test/test_declare.py
+++ b/test/test_declare.py
@@ -3,12 +3,13 @@
 """
 
 import pytest
+import requests
+from starkware.starknet.definitions.error_codes import StarknetErrorCode
 
-from .account import declare, invoke
+from .account import declare
+from .settings import APP_URL
 from .shared import (
-    ABI_PATH,
     CONTRACT_PATH,
-    DEPLOYER_CONTRACT_PATH,
     EXPECTED_CLASS_HASH,
     PREDEPLOY_ACCOUNT_CLI_ARGS,
     PREDEPLOYED_ACCOUNT_ADDRESS,
@@ -16,37 +17,13 @@
 )
 from .util import (
     assert_contract_class,
-    assert_equal,
     assert_hex_equal,
     assert_tx_status,
-    call,
-    deploy,
     devnet_in_background,
     get_class_by_hash,
-    get_class_hash_at,
-    get_transaction_receipt,
 )
 
 
-def assert_deployed_through_syscall(tx_hash, initial_balance: str):
-    """Asserts that a contract has been deployed using the deploy syscall"""
-    assert_tx_status(tx_hash, "ACCEPTED_ON_L2")
-
-    # Get deployment address from emitted event
-    tx_receipt = get_transaction_receipt(tx_hash=tx_hash)
-    events = tx_receipt["events"]
-    event = events[0]
-    assert_equal(len(event["data"]), 1, explanation=events)
-    contract_address = event["data"][0]
-
-    # Test deployed contract
-    fetched_class_hash = get_class_hash_at(contract_address=contract_address)
-    assert_hex_equal(fetched_class_hash, EXPECTED_CLASS_HASH)
-
-    balance = call(function="get_balance", address=contract_address, abi_path=ABI_PATH)
-    assert_equal(balance, initial_balance)
-
-
 @pytest.mark.declare
 @devnet_in_background(*PREDEPLOY_ACCOUNT_CLI_ARGS)
 def test_declare_max_fee_too_low():
@@ -62,43 +39,27 @@ def test_declare_max_fee_too_low():
     assert_hex_equal(class_hash, EXPECTED_CLASS_HASH)
     assert_tx_status(declare_info["tx_hash"], "REJECTED")
 
+    resp = requests.get(
+        f"{APP_URL}/feeder_gateway/get_class_by_hash?classHash={class_hash}"
+    )
+    assert resp.json()["code"] == str(StarknetErrorCode.UNDECLARED_CLASS)
+    assert resp.status_code == 500
+
 
 @pytest.mark.declare
 @devnet_in_background(*PREDEPLOY_ACCOUNT_CLI_ARGS)
-def test_declare_and_deploy():
-    """
-    Test declaring a class and deploying it through an account.
-    """
+def test_declare_happy_path():
+    """Test declaring if max fee sufficient"""
 
-    # Declare the class to be deployed
     declare_info = declare(
         contract_path=CONTRACT_PATH,
         account_address=PREDEPLOYED_ACCOUNT_ADDRESS,
         private_key=PREDEPLOYED_ACCOUNT_PRIVATE_KEY,
+        max_fee=int(1e18),
     )
     class_hash = declare_info["class_hash"]
     assert_hex_equal(class_hash, EXPECTED_CLASS_HASH)
+    assert_tx_status(declare_info["tx_hash"], "ACCEPTED_ON_L2")
 
-    contract_class = get_class_by_hash(class_hash=class_hash)
-    assert_contract_class(contract_class, CONTRACT_PATH)
-
-    # Deploy the deployer - also deploys a contract of the declared class using the deploy syscall
-    initial_balance_in_constructor = "5"
-    deployer_deploy_info = deploy(
-        contract=DEPLOYER_CONTRACT_PATH,
-        inputs=[class_hash, initial_balance_in_constructor],
-    )
-    deployer_address = deployer_deploy_info["address"]
-
-    assert_deployed_through_syscall(
-        deployer_deploy_info["tx_hash"], initial_balance_in_constructor
-    )
-
-    # Deploy a contract of the declared class through the deployer
-    initial_balance = "10"
-    invoke_tx_hash = invoke(
-        calls=[(deployer_address, "deploy_contract", [initial_balance])],
-        account_address=PREDEPLOYED_ACCOUNT_ADDRESS,
-        private_key=PREDEPLOYED_ACCOUNT_PRIVATE_KEY,
-    )
-    assert_deployed_through_syscall(invoke_tx_hash, initial_balance)
+    declared_class = get_class_by_hash(class_hash)
+    assert_contract_class(declared_class, CONTRACT_PATH)
diff --git a/test/test_deploy.py b/test/test_deploy.py
index a9b74cbe2..ab48a6841 100644
--- a/test/test_deploy.py
+++ b/test/test_deploy.py
@@ -23,25 +23,38 @@
     account_contract as oz_account_class,
 )
 from starknet_devnet.constants import OZ_ACCOUNT_CLASS_HASH
-
 from starknet_devnet.devnet_config import parse_args, DevnetConfig
 from starknet_devnet.starknet_wrapper import StarknetWrapper
+from starknet_devnet.udc import UDC
+
+from .shared import (
+    ABI_PATH,
+    CONTRACT_PATH,
+    DEPLOYER_CONTRACT_PATH,
+    EXPECTED_CLASS_HASH,
+    EXPECTED_UDC_ADDRESS,
+    PREDEPLOY_ACCOUNT_CLI_ARGS,
+    PREDEPLOYED_ACCOUNT_ADDRESS,
+    PREDEPLOYED_ACCOUNT_PRIVATE_KEY,
+    STARKNET_CLI_ACCOUNT_ABI_PATH,
+    SUPPORTED_TX_VERSION,
+)
+
+from .account import declare, invoke
 from .util import (
+    assert_contract_class,
+    assert_equal,
     assert_hex_equal,
     assert_tx_status,
     call,
     deploy,
     devnet_in_background,
+    get_class_by_hash,
+    get_class_hash_at,
+    get_transaction_receipt,
     mint,
     send_tx,
 )
-from .shared import (
-    ABI_PATH,
-    CONTRACT_PATH,
-    PREDEPLOY_ACCOUNT_CLI_ARGS,
-    STARKNET_CLI_ACCOUNT_ABI_PATH,
-    SUPPORTED_TX_VERSION,
-)
 
 
 def get_contract_class():
@@ -197,3 +210,106 @@ def test_deploy_account():
         function="get_balance", address=contract_address, abi_path=ABI_PATH
     )
     assert balance_after == "40"
+
+
+def _assert_deployed_through_syscall(
+    tx_hash: str, address_index: int, initial_balance: str
+):
+    """Asserts that a contract has been deployed using the deploy syscall"""
+    assert_tx_status(tx_hash, "ACCEPTED_ON_L2")
+
+    # Get deployment address from emitted event
+    tx_receipt = get_transaction_receipt(tx_hash=tx_hash)
+    events = tx_receipt["events"]
+
+    # there can be multiple events, e.g. from fee_token, but the first one is ours
+    event = events[0]
+    contract_address = event["data"][address_index]
+
+    # Test deployed contract
+    fetched_class_hash = get_class_hash_at(contract_address=contract_address)
+    assert_hex_equal(fetched_class_hash, EXPECTED_CLASS_HASH)
+
+    balance = call(function="get_balance", address=contract_address, abi_path=ABI_PATH)
+    assert_equal(balance, initial_balance)
+
+
+@pytest.mark.declare
+@devnet_in_background(*PREDEPLOY_ACCOUNT_CLI_ARGS)
+def test_deploy_through_deployer_constructor():
+    """
+    Test declaring a class and deploying it through an account.
+    """
+
+    # Declare the class to be deployed
+    declare_info = declare(
+        contract_path=CONTRACT_PATH,
+        account_address=PREDEPLOYED_ACCOUNT_ADDRESS,
+        private_key=PREDEPLOYED_ACCOUNT_PRIVATE_KEY,
+    )
+    class_hash = declare_info["class_hash"]
+    assert_hex_equal(class_hash, EXPECTED_CLASS_HASH)
+
+    contract_class = get_class_by_hash(class_hash=class_hash)
+    assert_contract_class(contract_class, CONTRACT_PATH)
+
+    # Deploy the deployer - also deploys a contract of the declared class using the deploy syscall
+    initial_balance_in_constructor = "5"
+    deployer_deploy_info = deploy(
+        contract=DEPLOYER_CONTRACT_PATH,
+        inputs=[class_hash, initial_balance_in_constructor],
+    )
+
+    _assert_deployed_through_syscall(
+        tx_hash=deployer_deploy_info["tx_hash"],
+        address_index=0,
+        initial_balance=initial_balance_in_constructor,
+    )
+
+
+def test_precomputed_udc_address():
+    """Test if the precomputed address of UDC is correct."""
+    assert_equal(UDC.ADDRESS, int(EXPECTED_UDC_ADDRESS, 16))
+
+
+@devnet_in_background(*PREDEPLOY_ACCOUNT_CLI_ARGS)
+def test_deploy_with_udc():
+    """Test if deploying through UDC works."""
+
+    # Declare the class to be deployed
+    declare_info = declare(
+        contract_path=CONTRACT_PATH,
+        account_address=PREDEPLOYED_ACCOUNT_ADDRESS,
+        private_key=PREDEPLOYED_ACCOUNT_PRIVATE_KEY,
+    )
+    class_hash = declare_info["class_hash"]
+    assert_hex_equal(class_hash, EXPECTED_CLASS_HASH)
+
+    contract_class = get_class_by_hash(class_hash=class_hash)
+    assert_contract_class(contract_class, CONTRACT_PATH)
+
+    # Deploy a contract of the declared class through the deployer
+    initial_balance = "10"
+    ctor_args = [initial_balance]
+    invoke_tx_hash = invoke(
+        calls=[
+            (
+                EXPECTED_UDC_ADDRESS,
+                "deployContract",
+                [
+                    int(class_hash, 16),
+                    42,  # salt
+                    0,  # unique
+                    len(ctor_args),
+                    *ctor_args,
+                ],
+            )
+        ],
+        account_address=PREDEPLOYED_ACCOUNT_ADDRESS,
+        private_key=PREDEPLOYED_ACCOUNT_PRIVATE_KEY,
+    )
+    _assert_deployed_through_syscall(
+        tx_hash=invoke_tx_hash,
+        address_index=0,
+        initial_balance=initial_balance,
+    )
diff --git a/test/test_estimate_fee.py b/test/test_estimate_fee.py
index 9f5fe5bb7..ae0938fa9 100644
--- a/test/test_estimate_fee.py
+++ b/test/test_estimate_fee.py
@@ -19,6 +19,7 @@
 from .shared import (
     CONTRACT_PATH,
     EXPECTED_CLASS_HASH,
+    EXPECTED_FEE_TOKEN_ADDRESS,
     L1L2_ABI_PATH,
     L1L2_CONTRACT_PATH,
     PREDEPLOY_ACCOUNT_CLI_ARGS,
@@ -68,7 +69,7 @@ def test_estimate_fee_with_genesis_block():
                 "0",
             ],
             "signature": [],
-            "contract_address": "0x62230ea046a9a5fbc261ac77d03c8d41e5d442db2284587570ab46455fd2488",
+            "contract_address": EXPECTED_FEE_TOKEN_ADDRESS,
         }
     )
 
diff --git a/test/test_fee_token.py b/test/test_fee_token.py
index faf4047d2..35e3bec9f 100644
--- a/test/test_fee_token.py
+++ b/test/test_fee_token.py
@@ -15,6 +15,7 @@
     get_account_balance,
 )
 from .shared import (
+    EXPECTED_FEE_TOKEN_ADDRESS,
     GENESIS_BLOCK_NUMBER,
     PREDEPLOY_ACCOUNT_CLI_ARGS,
     PREDEPLOYED_ACCOUNT_ADDRESS,
@@ -26,10 +27,7 @@
 @pytest.mark.fee_token
 def test_precomputed_address_unchanged():
     """Assert that the precomputed fee_token address is unchanged."""
-    assert_equal(
-        FeeToken.ADDRESS,
-        2774287484619332564597403632816768868845110259953541691709975889937073775752,
-    )
+    assert_equal(FeeToken.ADDRESS, int(EXPECTED_FEE_TOKEN_ADDRESS, 16))
 
 
 @pytest.mark.fee_token
@@ -37,10 +35,7 @@ def test_fee_token_address():
     """Sends fee token request;"""
     response = app.test_client().get("/fee_token")
     assert response.status_code == 200
-    assert (
-        response.json.get("address")
-        == "0x62230ea046a9a5fbc261ac77d03c8d41e5d442db2284587570ab46455fd2488"
-    )
+    assert response.json.get("address") == EXPECTED_FEE_TOKEN_ADDRESS
     assert response.json.get("symbol") == "ETH"
 
 
diff --git a/test/util.py b/test/util.py
index 994694761..518df5ab2 100644
--- a/test/util.py
+++ b/test/util.py
@@ -383,7 +383,7 @@ def load_json_from_path(path):
         return json.load(expected_file)
 
 
-def get_transaction_receipt(tx_hash):
+def get_transaction_receipt(tx_hash: str):
     """Fetches the transaction receipt of transaction with tx_hash"""
     output = run_starknet(["get_transaction_receipt", "--hash", tx_hash])
     return json.loads(output.stdout)
@@ -401,7 +401,7 @@ def get_class_hash_at(contract_address: str) -> str:
     return output.stdout
 
 
-def get_class_by_hash(class_hash: str) -> str:
+def get_class_by_hash(class_hash: str):
     """Gets contract class by contract hash"""
     output = run_starknet(["get_class_by_hash", "--class_hash", class_hash])
     return ContractClass.loads(output.stdout)