As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [archetype]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
47 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
  • 163
1 vote
1 answer
38 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
170 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
  • 163
0 votes
0 answers
32 views

Is it possible to have an entrypoint call return the gas expended in Archetype mockup mode?

I am writing some basic tests and I want to confirm that the balances of various accounts are correct after an entrypoint is called. I would like to ensure fees have been properly accounted for so my ...
Grum's user avatar
  • 163
0 votes
1 answer
7 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
  • 163
3 votes
1 answer
44 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
2 votes
1 answer
25 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
  • 163
1 vote
1 answer
37 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
  • 163
0 votes
2 answers
20 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
  • 163
0 votes
2 answers
26 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
  • 163
0 votes
1 answer
22 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
  • 163
0 votes
1 answer
39 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
  • 163
2 votes
1 answer
69 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
  • 163