Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal 47 submission 7 #22

Open
wants to merge 117 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
32d59a6
Add files via upload
eteslov Jul 2, 2021
b110783
Add files via upload
eteslov Jul 2, 2021
1b0f122
Update README.md
eteslov Jul 2, 2021
19998a4
Update README.md
eteslov Jul 2, 2021
3f44181
Add files via upload
eteslov Jul 12, 2021
daeafd0
Add files via upload
eteslov Jul 12, 2021
4442f1a
Add files via upload
eteslov Jul 12, 2021
2cf1092
Add files via upload
eteslov Jul 12, 2021
368c690
Add files via upload
eteslov Jul 12, 2021
6718d21
Add files via upload
eteslov Jul 12, 2021
c9f7c88
Add files via upload
eteslov Jul 12, 2021
afdf07b
Delete components/core directory
eteslov Jul 12, 2021
abe1287
Update README.md
eteslov Jul 12, 2021
8e2a35b
Update README.md
eteslov Jul 12, 2021
7dd668b
Update files
Jul 20, 2021
28c9da2
Update README.md
eteslov Aug 5, 2021
67f9879
Update README.md
eteslov Aug 5, 2021
b00334d
Update surfer nft
Aug 13, 2021
9b67ec2
Remove lock files
Aug 13, 2021
554b9ad
Update debot deploy script
Aug 13, 2021
178db5e
Add nft contract packages
Aug 13, 2021
2119c27
Allow to use the same debot keys for deploy
Aug 13, 2021
71eaaeb
Add true-nft-content
Sep 13, 2021
a6755f1
Update compiled index and basis
Sep 14, 2021
4e47193
update
Sep 28, 2021
95d0712
init
Systerr Nov 28, 2021
43b8f89
return old packages
Systerr Nov 28, 2021
74b8254
o login
Systerr Nov 28, 2021
85a81c2
login wip
Systerr Nov 28, 2021
d4eb48e
more variables
Systerr Nov 28, 2021
6e873d4
login logout
Systerr Nov 28, 2021
7968966
navigate
Systerr Nov 28, 2021
6e0fb6e
create nft
Systerr Nov 28, 2021
90bedb0
Added UI of adding layer
shaw12 Nov 29, 2021
2f90c09
Updated create new NFT Page.
shaw12 Nov 30, 2021
0408cb2
updated CreateNFT
shaw12 Dec 1, 2021
f03a2b5
Updated Create NFT
shaw12 Dec 1, 2021
af5b653
update contracts
Dec 1, 2021
e2393a3
minor fix bug
Dec 1, 2021
dffc69a
add payout
Dec 1, 2021
e21e45f
Merge pull request #1 from Tonium-io/feature/add-newLayer
Systerr Dec 2, 2021
70abf13
Fixed delete layer and upload Image on Drop Event
shaw12 Dec 3, 2021
4d287fe
nfts
Systerr Dec 3, 2021
e41ccac
nft
Systerr Dec 3, 2021
808cb08
Merge branch 'master' into feature/layer
shaw12 Dec 3, 2021
e9d43b0
Merge branch 'master' into feature/layer
shaw12 Dec 3, 2021
d610977
Merge pull request #2 from Tonium-io/feature/layer
Systerr Dec 3, 2021
08fa514
generate images
Systerr Dec 3, 2021
0928109
fix formating
Systerr Dec 3, 2021
6d1b969
create nft
Systerr Dec 3, 2021
5a7b857
images part 2
Systerr Dec 3, 2021
0da422a
get meta
Systerr Dec 3, 2021
a8f28df
uploadImageToIpfs stub
Systerr Dec 3, 2021
b9a06f7
getDataForBlockchain
Systerr Dec 3, 2021
6b5c982
Added functionality of IPFS upload image
shaw12 Dec 3, 2021
d62cfe9
Refractored Upload Ipfs functionality
shaw12 Dec 3, 2021
3e31f5a
Merge pull request #3 from Tonium-io/fature/new-functionality
Systerr Dec 4, 2021
1301788
Updated IPFS upload Image
shaw12 Dec 4, 2021
4a027f7
Merge pull request #4 from Tonium-io/fature/new-functionality
Systerr Dec 4, 2021
6772607
lock file
Systerr Dec 4, 2021
267be3a
routes and no blog
Systerr Dec 4, 2021
e168bfc
dashboard fix
Systerr Dec 4, 2021
bb6f371
routes
Systerr Dec 4, 2021
17caf35
soon text
Systerr Dec 4, 2021
8866757
login first
Systerr Dec 4, 2021
7dc7c44
search soon
Systerr Dec 4, 2021
8f78749
notifications
Systerr Dec 4, 2021
27fe4fd
ipfs initi
Systerr Dec 4, 2021
39035e5
Added Boilerplate for BlockChain Integration
shaw12 Dec 4, 2021
4ddbadc
deps
Systerr Dec 5, 2021
d1c42c2
deps
Systerr Dec 5, 2021
cd3b976
Updated Blockchain integration
shaw12 Dec 5, 2021
567eba2
total
Systerr Dec 6, 2021
09e182b
deps
Systerr Dec 6, 2021
13759ab
create nft update
Systerr Dec 6, 2021
7757e9a
Delete yarn.lock
shaw12 Dec 7, 2021
f644883
Merge branch 'master' into fature/new-functionality
shaw12 Dec 7, 2021
f9c53c8
layers
Systerr Dec 7, 2021
152ad61
white scape
Systerr Dec 7, 2021
95377b1
hover
Systerr Dec 7, 2021
10d7bad
pointer
Systerr Dec 7, 2021
aabb20c
styles
Systerr Dec 7, 2021
85ac678
Merge branch 'master' into fature/new-functionality
shaw12 Dec 7, 2021
22920e4
add
Dec 7, 2021
2d5c829
Updated UI and add Validation
shaw12 Dec 7, 2021
8a63744
no global ipfs
Systerr Dec 8, 2021
243782c
Removed extra code and Added validation message and updated UI
shaw12 Dec 8, 2021
d78cfbd
Updated eslint
shaw12 Dec 8, 2021
5167844
Merge pull request #5 from Tonium-io/fature/new-functionality
Systerr Dec 8, 2021
e6ba0bf
fix lint
Systerr Dec 8, 2021
f87b9c9
Fixed warning and Fixed negative number issue
shaw12 Dec 8, 2021
fa57292
Merge pull request #6 from Tonium-io/ui-fixes
Systerr Dec 8, 2021
4c428d3
dialog fix
Systerr Dec 8, 2021
ff06924
ipfs
Systerr Dec 8, 2021
17b3918
ipfs
Systerr Dec 8, 2021
3c7c007
mac 10 images
Systerr Dec 8, 2021
74f2ca0
10 images
Systerr Dec 8, 2021
c3ecd1e
path
Systerr Dec 8, 2021
01b3fa8
Added favicon, Logo and Completed trello tasks.
shaw12 Dec 8, 2021
e2473ab
Updated helmet text
shaw12 Dec 8, 2021
b6ea007
Merge branch 'master' into ui-fixes
shaw12 Dec 8, 2021
1b6fc11
update
Dec 8, 2021
202ba2c
Merge pull request #7 from Tonium-io/ui-fixes
Systerr Dec 9, 2021
162db90
nft
Systerr Dec 9, 2021
5e3ae31
Merge branch 'master' of github.com:Tonium-io/generative-frontend
Systerr Dec 9, 2021
bfbf932
login update
Systerr Dec 9, 2021
a51d26c
readme
Systerr Dec 9, 2021
62a234f
description
Systerr Dec 9, 2021
1c33fe8
download json
Systerr Dec 9, 2021
db51291
nft update
Systerr Dec 9, 2021
2870c15
add ipfs
Systerr Dec 9, 2021
028d183
ipfs
Systerr Dec 9, 2021
e97d751
bg
Systerr Dec 9, 2021
c442403
texts change
Systerr Dec 9, 2021
b673754
package
Systerr Dec 9, 2021
ac449d5
Add 'proposal-47/submission-7/contracts/' from commit '1b6fc11f4e5b05…
Systerr Dec 9, 2021
e031f74
Add 'proposal-47/submission-7/frontend/' from commit 'b67375485487b3c…
Systerr Dec 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions proposal-47/submission-7/contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
package-lock.json
yarn.lock
share/surfer/build/*
25 changes: 25 additions & 0 deletions proposal-47/submission-7/contracts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
TrueNFT is the implementation of on-chain NFT technology on the Free TON blockchain.

This technology was developed to:
- make sure the entirety of the NFT data is stored on the blockchain, without relying on any third-party protocols
- simplify and standardise queries for finding collections and user's NFT tokens
- enable users to interact with their tokens in decentralized browsers and dApps knowing only their own address, and to transfer them knowing just the recipient's address.

These requirements are met if the system is implemented based on the following contracts:
- NFTRoot - customizable contract containing minting logic and information about a collection
- NFTBasis - fixed contract for simple collection search
- NFTIndex - fixed contract, index for simple user token search
- NFTData - customizable contract containing token data and transfer logic.

Explore core implementation and usage examples here -> https://github.com/tonlabs/True-NFT/tree/main/components/true-nft-core

**Changelog 12 Jul 2021**

The problem with the old specification - a query of all NftData on all NftRoots for a specific owner (Surf address) was needed
The solution - an additional search index

- search indexes were implemented within a single contract, so only one code needs to be stored
- transfer mechanism was moved from NftRoot to NftData, so owner change with a single internal message is guaranteed
- the amount of code didn't change, while all primary queries are implemented in indexes and basis
- contract name was changed from Nft to Index (IndexOwner & IndexOwnerRoot are shown as different classes in the scheme, even though it's a single contract - it's deployed with different salt, therefore the hashCodes are different)
- mapping in NftRoot and the mechanism of waiting for owner change was removed
54 changes: 54 additions & 0 deletions proposal-47/submission-7/contracts/components/compiler/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
const fs = require("fs");
const { exec } = require("child_process");

const execPromise = (cmd) => {
return new Promise(function (resolve, reject) {
exec(cmd, function (err, stdout) {
if (err) return reject(err);
resolve(stdout);
});
});
};

const compile = (smcNames) => {
const compileScripts = [];
if (!fs.existsSync("build")) compileScripts.push(`mkdir build`);
if (!fs.existsSync("ton-packages")) compileScripts.push(`mkdir ton-packages`);

smcNames.forEach((name) => {
compileScripts.push(`npx tondev sol compile -o ./build ./src/${name}.sol`);
});

compileScripts
.reduce(
(p, cmd) =>
p.then((results) =>
execPromise(cmd).then((stdout) => {
results.push(stdout);
return results;
})
),
Promise.resolve([])
)
.then(
(/* results */) => {
smcNames.forEach((name) => {
const abiRaw = fs.readFileSync(`./build/${name}.abi.json`);
const abi = JSON.parse(abiRaw);
const image = fs.readFileSync(`./build/${name}.tvc`, {
encoding: "base64",
});

fs.writeFileSync(
`./ton-packages/${name}.package.ts`,
`export default ${JSON.stringify({ abi, image })}`
);
});
},
console.log
);
};

module.exports = {
compile,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@ton-contracts/compiler",
"version": "0.0.1",
"main": "index.js",
"devDependencies": {},
"dependencies": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pragma ton-solidity >=0.35.0;

interface IAddressInput {
function get(uint32 answerId, string prompt) external returns (address value);
}

library AddressInput {
int8 constant DEBOT_WC = -31;
uint256 constant ID = 0xd7ed1bd8e6230871116f4522e58df0a93c5520c56f4ade23ef3d8919a984653b;

function get(uint32 answerId, string prompt) public pure {
address addr = address.makeAddrStd(DEBOT_WC, ID);
IAddressInput(addr).get(answerId, prompt);
}
}

contract AddressInputABI is IAddressInput {
function get(uint32 answerId, string prompt) external override returns (address value) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pragma ton-solidity >=0.35.0;

interface IAmountInput {

function get(uint32 answerId, string prompt, uint8 decimals, uint128 min, uint128 max) external returns (uint128 value);

}

library AmountInput {

uint256 constant ID = 0xa1d347099e29c1624c8890619daf207bde18e92df5220a54bcc6d858309ece84;
int8 constant DEBOT_WC = -31;

function get(uint32 answerId, string prompt, uint8 decimals, uint128 min, uint128 max) public pure {
address addr = address.makeAddrStd(DEBOT_WC, ID);
IAmountInput(addr).get(answerId, prompt, decimals, min, max);
}

}

contract AmountInputABI is IAmountInput {

function get(uint32 answerId, string prompt, uint8 decimals, uint128 min, uint128 max) external override returns (uint128 value) {}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pragma ton-solidity >=0.35.0;

interface IConfirmInput {

function get(uint32 answerId, string prompt) external returns (bool value);

}

library ConfirmInput {

uint256 constant ID = 0x16653eaf34c921467120f2685d425ff963db5cbb5aa676a62a2e33bfc3f6828a;
int8 constant DEBOT_WC = -31;

function get(uint32 answerId, string prompt) public pure {
address addr = address.makeAddrStd(DEBOT_WC, ID);
IConfirmInput(addr).get(answerId, prompt);
}

}

contract ConfirmInputABI is IConfirmInput {

function get(uint32 answerId, string prompt) external override returns (bool value) {}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
pragma ton-solidity >=0.35.0;
pragma AbiHeader expire;
pragma AbiHeader time;
pragma AbiHeader pubkey;

abstract contract Debot {

uint8 constant DEBOT_ABI = 1;

uint8 m_options;
optional(string) m_debotAbi;
/// @notice Deprecated. For compatibility with old DEngine.
optional(string) m_targetAbi;
/// @notice Deprecated. For compatibility with old DEngine.
optional(address) m_target;

/*
* Public debot interface
*/

/// @notice DeBot entry point.
function start() public virtual;

/// @notice Returns list of interfaces used by DeBot.
function getRequiredInterfaces() public view virtual returns (uint256[] interfaces);

/// @notice Returns DeBot metadata.
/// @return name String with name of debot, e.g. "DePool".
/// @return version Semver version of debot, that will be converted to string like "x.y.z".
/// @return publisher String with info about who has deployed debot to blokchain, e.g. "TON Labs".
/// @return key (10-20 ch.) String with short description, e.g. "Work with Smthg".
/// @return author String with name of author of DeBot, e.g. "Ivan Ivanov".
/// @return support Free TON address of author for questions and donations.
/// @return hello String with first messsage with DeBot description.
/// @return language (ISO-639) String with debot interface language, e.g. "en".
/// @return dabi String with debot ABI.
function getDebotInfo() public functionID(0xDEB) view virtual returns(
string name, string version, string publisher, string key, string author,
address support, string hello, string language, string dabi, bytes icon);

/// @notice Returns DeBot ABI.
/// Deprecated.
function getDebotOptions() public view returns (uint8 options, string debotAbi, string targetAbi, address targetAddr) {
debotAbi = m_debotAbi.hasValue() ? m_debotAbi.get() : "";
targetAbi = m_targetAbi.hasValue() ? m_targetAbi.get() : "";
targetAddr = m_target.hasValue() ? m_target.get() : address(0);
options = m_options;
}

/// @notice Allow to set debot ABI. Do it before using debot.
function setABI(string dabi) public {
require(tvm.pubkey() == msg.pubkey(), 100);
tvm.accept();
m_options |= DEBOT_ABI;
m_debotAbi = dabi;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pragma ton-solidity >=0.35.0;

abstract contract Destructable {
function _destruct(address addr) internal {
selfdestruct(addr);
}

function destruct() public virtual;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pragma ton-solidity >=0.35.0;

struct MenuItem {
string title;
string description;
uint32 handlerId;
}

interface IMenu {

function select(string title, string description, MenuItem[] items) external returns (uint32 index);

}

library Menu {

uint256 constant ID = 0xac1a4d3ecea232e49783df4a23a81823cdca3205dc58cd20c4db259c25605b48;
int8 constant DEBOT_WC = -31;

function select(string title, string description, MenuItem[] items) public pure {
address addr = address.makeAddrStd(DEBOT_WC, ID);
IMenu(addr).select(title, description, items);
}
}

contract MenuABI is IMenu {

function select(string title, string description, MenuItem[] items) external override returns (uint32 index) {}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pragma ton-solidity >=0.35.0;

interface IMsg {

function sendWithKeypair(uint32 answerId, TvmCell message, uint256 pub, uint256 sec) external;

}

library Msg {

uint256 constant ID_MSG = 0x475a5d1729acee4601c2a8cb67240e4da5316cc90a116e1b181d905e79401c51;
int8 constant DEBOT_WC = -31;

function sendWithKeypair(uint32 answerId, TvmCell message, uint256 pub, uint256 sec) public pure {
address addr = address.makeAddrStd(DEBOT_WC, ID_MSG);
IMsg(addr).sendWithKeypair(answerId, message, pub, sec);
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pragma ton-solidity >=0.35.0;

interface INumberInput {

function get(uint32 answerId, string prompt, int256 min, int256 max) external returns (int256 value);

}

library NumberInput {

uint256 constant ID = 0xc5a9558b2664aed7dc3e6123436d544f13ffe69ab0e259412f48c6d1c8588401;
int8 constant DEBOT_WC = -31;

function get(uint32 answerId, string prompt, int256 min, int256 max) public pure {
address addr = address.makeAddrStd(DEBOT_WC, ID);
INumberInput(addr).get(answerId, prompt, min, max);
}
}

contract NumberInputABI is INumberInput {

function get(uint32 answerId, string prompt, int256 min, int256 max) external override returns (int256 value) {}

}
Loading