diff --git a/precompile/binaries/minlib/object.mv b/precompile/binaries/minlib/object.mv index 9a7cf03b..e98c8212 100644 Binary files a/precompile/binaries/minlib/object.mv and b/precompile/binaries/minlib/object.mv differ diff --git a/precompile/binaries/stdlib/object.mv b/precompile/binaries/stdlib/object.mv index 9a7cf03b..e98c8212 100644 Binary files a/precompile/binaries/stdlib/object.mv and b/precompile/binaries/stdlib/object.mv differ diff --git a/precompile/modules/initia_stdlib/sources/object.move b/precompile/modules/initia_stdlib/sources/object.move index 373d6421..3f0d055c 100644 --- a/precompile/modules/initia_stdlib/sources/object.move +++ b/precompile/modules/initia_stdlib/sources/object.move @@ -178,6 +178,11 @@ module initia_std::object { exists(object) } + /// Returns true if there exists an object with resource T. + public fun object_exists(object: address): bool { + exists(object) && exists_at(object) + } + /// Derives an object address from source material: sha3_256([creator address | seed | 0xFE]). public fun create_object_address(source: &address, seed: vector): address { let bytes = bcs::to_bytes(source); diff --git a/precompile/modules/minitia_stdlib/sources/object.move b/precompile/modules/minitia_stdlib/sources/object.move index cc708a45..dcbbdd21 100644 --- a/precompile/modules/minitia_stdlib/sources/object.move +++ b/precompile/modules/minitia_stdlib/sources/object.move @@ -178,6 +178,11 @@ module minitia_std::object { exists(object) } + /// Returns true if there exists an object with resource T. + public fun object_exists(object: address): bool { + exists(object) && exists_at(object) + } + /// Derives an object address from source material: sha3_256([creator address | seed | 0xFE]). public fun create_object_address(source: &address, seed: vector): address { let bytes = bcs::to_bytes(source);