Questions tagged [archetype]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

Trying to create a FA2 token with Archetype

I’m trying to create a FA2 token, for this I use https://github.com/completium/archetype-fa2/blob/main/contracts/fa2_fungible.arl as an example. When I change line 71 to put my ipfs link in bytes (...
user avatar
0 votes
2 answers
67 views

CORS error with completium-cli sandbox

I'm trying to access a contract on the completium-cli sandbox within my dapp running on a local vite server. Ideally I would set up my dev environment so I can test deploy to the sandbox within the ...
Grum's user avatar
  • 147
0 votes
1 answer
43 views

How to call a getter entrypoint in contract using completium-cli

How to call a getter entrypoint in contract using completium-cli? For example if it is declared like this: variable bar : nat = 0 variable msg : string = "" getter getBar(s : string) : nat {...
ristiisa's user avatar
4 votes
3 answers
178 views

What's wrong with my calculation of fees and burn here?

I am trying to calculate the cost of a transaction, post-hoc, from the response to calling the entrypoint. This is for the purposes of a testing tool I am building that I need accurate costs for. As ...
Grum's user avatar
  • 147
0 votes
1 answer
8 views

How can I apply a minus operation to Tez type in the archetype testing library?

I am writing some simple contract tests, and I want to check that account balances are updating appropriately. There is currently no minus method on the Tez type. I attempted to add my own to the ...
Grum's user avatar
  • 147
2 votes
1 answer
58 views

archetype: how to remove the bytes that are prepended by the pack() routine

I am trying to concatenate two strings and then convert to bytes using pack(). However this prepends some bytes to the front of the result. var str1 : string = "TEST INDEX #"; var str2 = ...
TomCollins's user avatar
1 vote
1 answer
26 views

Do partitions reduce gas usage?

I have a ledger asset which is a big map. Each entry has a partition leading to another other asset, which in the worst case will have 20 entries in it associated with one entry in the ledger asset (I'...
Grum's user avatar
  • 147
0 votes
1 answer
50 views

How can I check if an address is a contract vs account (or how can I convert an address to a string) in archetype?

I am attempting to write a simple function to check if an address is an account (e.g tz1, tz2 etc) or contract address (KT). I want to write something like this: function isAddressContract(ad: address)...
Grum's user avatar
  • 147
0 votes
2 answers
27 views

How can I assign values for a map-type in an archetype test script?

I have the following typescript in my test script: const tmdBytes = Bytes.hex_encode("ipfs://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") const tmdMap : Array<[ ...
Grum's user avatar
  • 147
0 votes
2 answers
33 views

NatValidationError when deploying an archetype contract with taquito

I am attempting to deploy a very simple archetype contract with Taquito in a react Dapp. However, I am receiving a validation error. My guess is that I have the syntax wrong for the storage parameter, ...
Grum's user avatar
  • 147
0 votes
1 answer
33 views

How do you originate an archetype contract from within a dapp?

I’m trying to figure out how to originate a new contract from within a dapp. I seem to have found what I am looking for here: https://tezostaquito.io/docs/originate Here is the example code I am ...
Grum's user avatar
  • 147
0 votes
1 answer
43 views

How to call an entrypoint from the current contract?

There is a straightforward example of how to do this in the docs, however it does not seem to work for me. With the following code which I basically copied straight from the docs ... entry ...
Grum's user avatar
  • 147
2 votes
1 answer
75 views

How can I convert duration to int or nat in archetype?

Or: How can I multiply duration and tez? (I need tez as my output) I would usually write something about what I have tried - but I don't really know where to start with this one. I have looked through ...
Grum's user avatar
  • 147