A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [smartpy]

The tag has no usage guidance.

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

Type error, (sp.TRecord(addr = sp.TAddress)) is not (sp.TUnit) in smartPy

When I implement a getBalance in the FA1.2 function like this: @sp.entryPoint def getBalance(self, params): return self.data.balances[params.addr] As test: scenario += c1.getBalance(addr = ...
1
vote
1answer
15 views

venv / entrypoint return storage?

3 questions: 1) someone use Smartpy in a venv as a pip3 package? I was thinking about printing some variables for debug purposes — there is a similar feature in the editor? 2) if you are in a ...
1
vote
1answer
15 views

Local variables within smart contracts (Smartpy)

I'd like to share a question that were being worked on Smartpy telegram, and also a few thoughts along the way (it's a long way -- random observation). Some people were talking about local variables ...
1
vote
1answer
20 views

How to interact with SmartPy BigMap in contract?

I would like to setup a smart contract that contains (as defined by smartpy) a BigMap storage. I have the following code: import smartpy as sp class contract(sp.Contract): def __init__(self): ...
2
votes
1answer
12 views

How to create a mapping in smartpy ? Do we need to define the datatypes of the key & value like in solidity?

Want to implement mappings like this in smartpy : // Mapping from token ID to owner mapping (uint256 => address) private _tokenOwner; // Mapping from token ID to approved address mapping (...
5
votes
2answers
34 views

How do I get a list of a Tezos smart contract KT1 address entrypoints and its parameters?

I wish to retrieve info from a KT1 address so I know which entrypoints are available for consuming and which are their parameters and types. How can I achieve this? Thanks in advance.
2
votes
4answers
97 views

Ethereum/Solidity dev here, looking to migrate some Solidity contracts onto Tezos. Was hoping to have some light shed on a few questions

Was hoping to have some light shed on a few questions. Narrowing in on using Ligo, Archetype, or Liquidity. Is Liquidity kind of a dead-end right now? I noticed it's not listed on developeres.tezos....
2
votes
1answer
113 views

How to deploy a smart contract influenced by UI inputs using ConseilJS and SmartPy generated Michelson?

I wish to be able to create a smart contract taking input from a UI to supply parameters pubKey,prvKey,pubHash for the deployment and minAmount and maxTime to influence the Michelson. I have the ...
1
vote
2answers
22 views

How to total smartpy.TMutez type stored as values in smartpy.bigmap?

I have the following smartpy.bigmap in smart contract storage: import smartpy as sp self.data.init(bgmp=sp.bigmap(tkey=sp.TAddress,tvalue=sp.TMutez)) I would like to total all the stored tvalue so ...
2
votes
2answers
44 views

Tezos Blockchain Time in SmartPy

I am new to Tezos Block chain and I am writing a smart-contract for crowdfunding using smartPy. For this I need current date time of Tezos Block chain. So, can anyone help me out, how to find out this?...
1
vote
0answers
14 views

Split function contract template

Is there a code template for a simple contract which splits the incoming funds and sends them proportionally to a list of pre-registered addresses? Example: Contract has the following functions: ...
1
vote
2answers
55 views

Where are the API docs for SmartPy?

I'm working on a contract now and specifically I'd like to call a SmartPy API like sp.transfer(address, amount)? Is there a function like this? I can't find API docs for SmartPy and digging into the ...