Skip to content

Add short alias for Env current_contract_address() #1778

Description

@leighmcculloch

What problem does your feature solve?

Env::current_contract_address() is a commonly called methods in contract code, but its name is long compared to nearly everything else in the SDK. It doesn't cause a functional problem, but it makes lines of code that use it noticeably longer and a little harder to scan, especially when it appears multiple times in the same function or alongside other short method calls.

What would you like to see?

A short convenience alias.

What alternatives are there?

  • Keep only current_contract_address() and let users alias it themselves with a local let.
  • Rename current_contract_address() outright (breaking change, not worth it).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions