Skip to content

feat: support read-only address url param#362

Open
samsiegart wants to merge 1 commit into
mainfrom
readonly-address
Open

feat: support read-only address url param#362
samsiegart wants to merge 1 commit into
mainfrom
readonly-address

Conversation

@samsiegart

@samsiegart samsiegart commented Aug 28, 2024

Copy link
Copy Markdown
Collaborator

fixes #361

Description

Adds support for an address url param. E.g. https://ecb1905c.dapp-inter-test.pages.dev/?address=agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce. When used, it will connect to the dapp with that address in a read-only fashion, and let you copy messages to sign from the console.

I had to upgrade to the latest @agoric/web-components to use the newer clientConfig arg, which required updating some other deps and fixing some type issues along the way.

Screenshot of toast and console output after offer is "made"

Screen Shot 2024-08-27 at 10 39 48 PM

Example message copied from console (create vault)

[
    {
        "typeUrl": "/agoric.swingset.MsgWalletSpendAction",
        "value": {
            "owner": "+3a+rCqoP/+g2xwkLAcqeln7BrU=",
            "spendAction": "{\"body\":\"#{\\\"method\\\":\\\"executeOffer\\\",\\\"offer\\\":{\\\"id\\\":1724822982051,\\\"invitationSpec\\\":{\\\"callPipe\\\":[[\\\"getCollateralManager\\\",[\\\"$0.Alleged: ATOM brand#board01547\\\"]],[\\\"makeVaultInvitation\\\"]],\\\"instancePath\\\":[\\\"VaultFactory\\\"],\\\"source\\\":\\\"agoricContract\\\"},\\\"offerArgs\\\":\\\"#undefined\\\",\\\"proposal\\\":{\\\"give\\\":{\\\"Collateral\\\":{\\\"brand\\\":\\\"$0\\\",\\\"value\\\":\\\"+880256\\\"}},\\\"want\\\":{\\\"Minted\\\":{\\\"brand\\\":\\\"$1.Alleged: IST brand#board0257\\\",\\\"value\\\":\\\"+5000000\\\"}}}}}\",\"slots\":[\"board01547\",\"board0257\"]}"
        }
    }
]

@samsiegart samsiegart requested a review from dtribble August 28, 2024 05:44
@github-actions

github-actions Bot commented Aug 28, 2024

Copy link
Copy Markdown

Network:
Commit: 7914bec
Ref: refs/pull/362/merge
IPFS v1 hash: bafybeig63d6pjqikzmn4eclxlp6sy3nqeb2gx4lwjyrjsf5dqwsx4c4s7y
CF - DWeb - 4EVERLAND

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 28, 2024

Copy link
Copy Markdown

Deploying dapp-inter-test with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8415cca
Status: ✅  Deploy successful!
Preview URL: https://adf39582.dapp-inter-test.pages.dev
Branch Preview URL: https://readonly-address.dapp-inter-test.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agoric-dapp-inter-emerynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8415cca
Status: ✅  Deploy successful!
Preview URL: https://a29b9256.agoric-dapp-inter-emerynet.pages.dev
Branch Preview URL: https://readonly-address.agoric-dapp-inter-emerynet.pages.dev

View logs

@dtribble dtribble removed their request for review September 24, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for read-only address

1 participant