Questions tagged [smartpy]

Discussion about the SmartPy language

17 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
67 views

how to hook function in smartpy FA2

when calling transfer method, how to call hook method on received smart contract. I'm using fa2 in smartpy
2
votes
0answers
55 views

how can i call specific smartpy tezos contract entrypoint using ConseilJs?

I am trying to set UI that allow users to interact with tezos smart contract by pressing some buttons that have to call the corresponding function in the smart contract with relative arguments
1
vote
1answer
20 views

unhandledRejection {} when using smartpy cli compile/test

I did the installation of https://smartpy.io/docs/cli/ (including python,node and the cli version 0.8.3-1) both in ubuntu (windows subsystem) and in Windows 10 and every time I try to run compile or ...
1
vote
0answers
26 views

How can we accept USDTZ in smartpy smart contracts, is it even posible?

I was working on a token sale, so is there any way we can accept USDTZ as a mode of payment for the tokens?
1
vote
1answer
58 views

Can a Dapp buy or sell (usdtz or tzbtc) from dexter?

Looking for a way for a dapp to buy tzBTC automatically after receiving tez from a baker.
1
vote
2answers
134 views

Implementing Contract Metadata (tzip-16) on an already originated FA1.2 Smart Contract

Referring to the documents and examples of tzip-16, how would one implement the contract metadata on a Fa1.2 contract on SmartPy? In order to provide balance updates and offchain events.
1
vote
1answer
70 views

How to create a contract which would delegate XTZs and receive rewards?

I am trying to write a contract that receives rewards from the baker using a default entry point and should only allow me to change the baker from a different entry point. I am using the smartpy tool ...
1
vote
2answers
97 views

Send tezos to contract address after origination using conseiljs

I am trying to send tez from my tz1-AAA account to KT1-AAA contract address means I want my contract address to hold some tez. Disclaimer - I have knowingly replaced some part of address with "....(s)...
1
vote
0answers
22 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: ...
0
votes
0answers
25 views

missing token metadata

I believe with this operation ooDavbDYs9SkBR4JoaUxTBysvEnd7y1gP1ZDGddQgfQZaURpdjx I have created a token. This is the entry point I called @sp.entry_point def mintDiezDAO(self, params): sp....
0
votes
0answers
29 views

is there an implementation of the FA1.2 template in ligo with metadata ( TZIP-016)?

I have find 2 implementations of the FA1.2 template, one in PascaLigo (https://gitlab.com/camlcase-dev/fa1.2/-/blob/master/ligo/fa1.2.ligo) and one in CameLigo https://gitlab.com/ligolang/ligo/-/blob/...
0
votes
0answers
18 views

Is there any default FA2 / FA1.2 config to mint non-transferable tokens?

I am working on a requirement that needs a non-transferable token (similar to ERC 1238 requirement). ie the token can be transferred only from token contract/ admin to the user and the user cannot ...
0
votes
0answers
108 views

Mint FA2 NFT when contract is called by purchaser

I'm working on a smart contract which allows a caller to "purchase" an NFT simply by calling the contract and providing payment. I'd like the contract to mint the NFT at the time the ...
0
votes
0answers
23 views

how to work with map of map

I have a structure that looks like this: struc = sp.TRecord( addr = sp.TAddress, value = sp.TNat ) struct2 = sp.big_map( tkey=sp.TAddress, tvalue=sp.TMap( sp.TNat, sp....
0
votes
0answers
21 views

Can anyone refer me to a good code example that creates a Token crowdfunding STO/IDO/ICO contract in Tezos?

Can anyone refer me to a good code example that creates a Token crowdfunding STO/IDO/ICO contract in Tezos? (Comparable to ERC-20 crowdfunding contracts)
0
votes
1answer
83 views

Initiate a field in the storage of a contract with the source address of origination

I have the following smart contract where I pass admin address in the init function of the smart contract: (you can run it on smartPy online editor) class SC(sp.Contract): def __init__(self, ...
-1
votes
1answer
57 views

Tezos SmartPy Developer Course video 1.2

How do I get find the Tezos test net as opposed to the web browser smart py interface? Regards WF