a-music-copyright-item-based-on-ipfs-and-ethereum's People
a-music-copyright-item-based-on-ipfs-and-ethereum's Issues
Auction_Function
Tips
后续考虑向智能合约中加入拍卖的功能,也即音乐版权的出售功能。但是在当前项目上实现意义不大。以下是原因:
在拍卖功能中涉及到两个账户的转账操作。通过合约转账的流程是
Buyer->Smart Contract->Seller
也就是买家将竞价金额的eth转入合约中,若后续的竞价没有比该金额更大的,则这些eth从合约转入到卖家账户,拍卖结束。若有更大的,则将该金额从合约中退回到买家账户中。
买家金额转入合约是通过msg.value这个变量承载的,在Remix IDE中可以通过控制台直接输入。但是msg.value这个变量是只读的,在solidity中不能修改这个变量,且没有办法去指定这个交易金额值为函数参数,故不能通过将合约编译成Go的办法来调用转账函数。进而不能制作Web接口。
通过查询得知Web3.js可以预定义该msg.value值。那么此时可以在当前项目上添加通过js函数签署交易的操作,然后与Go交互,但是这样会导致Ethereum测试网以及合约地址的链接比较混乱。
不如直接使用Web3.js从头开始写合约的调用以及和前端的交互,而无需通过abigen以及gin来写这个项目。
如果您了解该问题的解决方法,请提出您的宝贵意见!!
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.