Skip to content

[Xverse] String with Clarity contract converted to base64 string when deploying #456

Description

@matronator

Describe the bug
When I want to deploy a contract using request, it converts the contract to Base64 or something like that. I pass regular string as a parameter, but in the popup window from Xverse, when I click on download contract or if I continue, the deployed contract is just one line of some random characters.

See here: https://explorer.hiro.so/txid/ST39DTEJFPPWA3295HEE5NXYGMM7GJ8MA2QA8AS9.daadas?chain=testnet

To Reproduce
Steps to reproduce the behavior:

const pc = Pc.principal(userData.addresses.stx[0].address).willSendGte(deployCost * 1000000).ustx();

const deployResponse = await request('stx_deployContract', {
    name: contractName,
    clarityCode: contractContent,
    postConditions: [pc],
    postConditionMode: 'allow',
});

Expected behavior
Deploy the contract as a Clarity string.

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: 136

Additional context
Add any other context about the problem here:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions