Skip to content

Resolve signer account from address - #734

Merged
matevz merged 1 commit into
masterfrom
matevz/feat/account-name-from-address
Oct 15, 2026
Merged

matevz merged 1 commit into
masterfrom
matevz/feat/account-name-from-address

Conversation

@matevz

@matevz matevz commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

In ROFL manifests, you currently need to set the admin: field to a valid account name in your wallet. This may differ from device to device, depending on how you named it. This PR allows you to define the signer account by its address as well and maps it to the corresponding local account name, if it exists.

Can be also used in combination with --account <name_or_address> flag for any other command.

Useful especially in ROFL manifests where admin account can be named
differently on each computer.
@matevz
matevz requested a review from kostko October 14, 2026 14:52
@matevz matevz added the rofl ROFL related CLI issues label Oct 14, 2026
@netlify

netlify Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for oasisprotocol-cli canceled.

Name Link
🔨 Latest commit 6fa5db7
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-cli/deploys/6acf974f931fec6a1dd1f118

Comment thread cmd/common/wallet.go
// Name may be a native or Ethereum address instead; resolve it to the matching configured
// wallet account, if any.
if addr, ethAddr, err := helpers.ResolveEthOrOasisAddress(name); err == nil && addr != nil {
for accName, acfg := range cfg.Wallet.All {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that multiple accounts can resolve to the same address in which case this would be ambiguous. Currently this takes a random account while the other possibility would be to detect and reject such cases.

@matevz
matevz merged commit e866149 into master Oct 15, 2026
5 checks passed
@matevz
matevz deleted the matevz/feat/account-name-from-address branch October 15, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rofl ROFL related CLI issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants