Comments (8)
Ok, let's keep the flexibility. @SaadTahirTintash would you please update "get-decimals" to accept uint (but returns u8 always).
from alex-v1.
Yes, the existing "transfer" and "transfer-fixed" need to be updated to reflect the trait (ie no memo). New "transfer-memo" and "transfer-memo-fixed" need to be created to allow transfer with memo.
from alex-v1.
sipxxx-semi-fungible-token-trait
This trait is different from what you've implemented. I think you've added more functions in it. I am just using the trait's new functions and keeping yours as well.
from alex-v1.
I've seen your usage of sft-trait
and you are using transfer-fixed
everywhere (transfer-fixed (uint uint principal principal (optional (buff 34))) (response bool uint))
instead of (transfer (uint uint principal principal) (response bool uint))
from the trait itself. Moreover, there is no place where you are sending any memo, every memo is set to none
from alex-v1.
The get-decimals
in the sipxxx-semi-fungible-token-trait
has signature (get-decimals (uint) (response uint uint))
which is different from your implementation of (get-decimals () (response uint uint))
.
from alex-v1.
@MarvinJanssen I was looking at get-decimals. The way it works currently is sum of supply of tokens = supply of semi-fungible token.
If each token has different decimals, it's not obvious to me how we can always ensure the equality.
I also see no obvious reasons why one may want different decimals for different tokens within a single semi-fungible token.
Anything I missed?
from alex-v1.
I don't see any implementation related to transfer-many
and transfer-many-memo
so I'm removing them from the trait for now.
from alex-v1.
@fiftyeightandeight Not all SFTs have to be equal internally. Imagine a game like Moonray, they might represent their in-game currency as ID = 1, decimals = 6, but also have a different commodity as ID = 2, decimals = 0. It depends on the developer, in this case you could always return the same value and ignore the uint
input parameter.
from alex-v1.
Related Issues (20)
- feat: fixed-weight-pool swap routing
- feat: LP token staking
- doc: update of error codes and source code documentation HOT 11
- feat: `trait-flash-loan-user.flash-loan-user-trait` implements (execute (<ft-trait> uint (optional (buff 16))) (response bool uint)) HOT 2
- fix: clean-up / removal of unused fixed-point functions from contracts HOT 4
- fix: `map`/`fold` with trait reference passed HOT 1
- fix: limit `yield-token-pool` size to % of `fixed-weight-pool` HOT 1
- Please cancel KYC
- fix(futures-pool): tokens to be held by vault HOT 1
- verify percent in reduce-position is better HOT 2
- feat(weighted-equation): uniswap implementation
- feat(fixed-weight-pool): uniswap implementation
- feat(fixed-weight-pool): swap-helper
- feat: oracle-helper
- feat: simplie-weight-pool-wstx
- ALEX banana info page typo HOT 1
- Missing `proposal-trait.clar` file HOT 4
- crp: `get-weight-x` ensures `yield-supply` <= `balance-y`
- Order book endpoint (/v1/orderbook/WSTX_SUSDT) returns a blank page HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alex-v1.