Git Product home page Git Product logo

developer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

developer's Issues

Hk.sol

pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // '0Fucks' token contract // // Deployed to : 0x5A86f0cafD4ef3ba4f0344C138afcC84bd1ED222 // Symbol : 0FUCKS // Name : 0 Fucks Token // Total supply: 100000000 // Decimals : 18 // // Enjoy. // // (c) by Moritz Neto with BokkyPooBah / Bok Consulting Pty Ltd Au 2017. The MIT Licence. // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // Safe maths // ---------------------------------------------------------------------------- contract SafeMath { function safeAdd(uint a, uint b) public pure returns (uint c) { c = a + b; require(c >= a); } function safeSub(uint a, uint b) public pure returns (uint c) { require(b <= a); c = a - b; } function safeMul(uint a, uint b) public pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function safeDiv(uint a, uint b) public pure returns (uint c) { require(b > 0); c = a / b; } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // ---------------------------------------------------------------------------- contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } // ---------------------------------------------------------------------------- // Contract function to receive approval and execute function in one call // // Borrowed from MiniMeToken // ---------------------------------------------------------------------------- contract ApproveAndCallFallBack { function receiveApproval(address from, uint256 tokens, address token, bytes data) public; } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; } function acceptOwnership() public { require(msg.sender == newOwner); emit OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract FucksToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ constructor() public { symbol = "0FUCKS"; name = "0 Fucks Token"; decimals = 18; _totalSupply = 100000000000000000000000000; balances[0x5A86f0cafD4ef3ba4f0344C138afcC84bd1ED222] = _totalSupply; emit Transfer(address(0), 0x5A86f0cafD4ef3ba4f0344C138afcC84bd1ED222, _totalSupply); } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; } // ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; } // ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(msg.sender, to, tokens); return true; } // ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double-spend attack // as this should be implemented in user interfaces // ------------------------------------------------------------------------ function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } // ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(from, to, tokens); return true; } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; } // ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // ------------------------------------------------------------------------ function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; } // ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------ function () public payable { revert(); } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); } }

In app browser

Hello, after reinstalling the wallet I lost my transaction history, is there anyway to get all in-app browser history?

Importing by public key is possible, this may partly satisfy your use cases.

Importing by public key is possible, this may partly satisfy your use cases.
Importing the private key (extended or not) or recovery phrase is not supported, and it would not be a good idea for security: private key should not leave the hardware wallet in any form.
Another issue is that currently Trust Wallet does not support multiple wallet addresses for the same coin, and there are no plans to support this in the foreseeable future.

See the section 'Method 4: Import via Public Key' section of the guide:
https://community.trustwallet.com/t/how-to-import-a-wallet/87#method-4-import-via-public-key

Trust Wallet
Due to the decentralized nature of Trust Wallet, you can import your old Trust Wallet or a 3rd party wallets using a Recovery Phrase, Private Key or a Keystore File. Also, you can import a Public Key which simply lets you view the contents of a wallet. Attention! You are solely responsible for your wallets security. Always create a backup before making any changes to your wallet. This guide is for educational purposes only. Create a Backup In order to export your wallet, you need to gain ...

Originally posted by @catenocrypt in trustwallet/wallet-core#1058 (comment)

When i use android sdk then get error in code which from documentation

Describe the bug
A clear and concise description of what the bug is.

When i add below line in my android kotlin project

val output = AnySigner.sign(signerInput, CoinType.ETHEREUM, Ethereum.SigningOutput.parser()) println("Signed transaction: \n${signerOutput.encoded.toByteArray().toHexString()}")

then i get this error:

  1. ype mismatch: inferred type is wallet.core.jni.proto.Ethereum.SigningInput! but wallet.core.jni.proto.Any.SigningInput! was expected

  2. Too many arguments for public open fun sign(p0: Any.SigningInput!): Any.SigningOutput! defined in wallet.core.jni.AnySigner

  3. Unresolved reference: encoded

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Cannot sign an Ethereum transaction due to EthereumSigningInput/ WalletCore.TW_Ethereum_Proto_SigningInput

Describe the bug
It looks like EthereumSigningInput does not have the property "amount" exposed and cannot be properly instantiated.

To Reproduce
Steps to reproduce the behavior:

Try to instantiate EthereumSigningInput with the amount property:

     let input = EthereumSigningInput.with {
                $0.amount = amountData!
            }

Expected behavior
One should be able to pass in the amount, just like in the docs: https://developer.trustwallet.com/wallet-core/integration-guide/wallet-core-usage#ethereum-transaction-signing

Screenshots
Screenshot 2022-02-07 at 18 07 30

Additional context
Using WalletCore 2.7.1 installed via the package manager for XCode
Screenshot 2022-02-07 at 18 07 49

[Question] typescript interface documentation

Hi Trust Wallet Team, Wallet Core is a really good corss-blockchain library. Do you have any typescript documentation so I can integrate it into my Electron project? BTW, is Windows supported?

Support Binance order

Hi @hewigovens and team.
Thank you for updating docs for Dapp page.

I have tried to run freeze order according to new instruction which is updated on the docs. But unfortunately, ._sendCallRequest(request) is never going to return the request. After debugging, looks function is stacking on utf8ToBytes function forever.
I think method: 'trust_signTransaction', is not working properly since get_accounts order is working well.
This is my code to run freeze function. Kindly please check and advise.
(Please feel free to clone the repo and reproduce this issue!)

Code:
https://github.com/roy1210/beptool_fork/blob/feat/%40walletconnect/client/src/components/pages/Freezer.js#L161

Demo:
https://beptool-fork-git-feat-walletconnectclient.roy1210.vercel.app/

P.S.
The old library, @trustwallet/walletconnect will handle freeze order without any issue. Hence, kindly investigate how this issue happens. Maybe missing something in my code?? Much appreciate if you can add an example of Binance orders as well. Thank you!

Code (Using @trustwallet/walletconnect): https://github.com/roy1210/beptool_fork/blob/feat/%40trustwallet/walletconnect/src/components/pages/Freezer.js#L150

Demo:
https://beptool-fork-git-feat-trustwalletwalletconnect.roy1210.vercel.app/

const request = connector._formatRequest({
    method: 'trust_signTransaction',
    params: [
        {
            network,
            transaction: JSON.stringify(tx),
        },
    ],
});

connector
 // Memo: Didn't return anything
  ._sendCallRequest(request)
  .then(result => {
    // Returns transaction signed in json or encoded format
    console.log(result);
  })
  .catch(error => {
    // Error returned when rejected
    console.error(error);
  });

Screenshot 2020-10-14 at 12 52 50 AM

Crypto Revolution Token Logo

Hi guys. Please I neen my token logo to be visible. My friends told me people from Trust Wallet githib can help me
Crypto Revolution Logo
](url)

Lost funds

Hi, I was transferring funds #fantom from Trust Wallet to Binance like I did the previous 2 times, but this time around, the transaction was stuck on pending and nothing was showing up on block chain explorer either so I reimported my wallet like the guide on the Trust Wallet forum. After reimporting, my pending transaction disappeared and the amount of funds I was transferring have vanished as well. They’ve been deducted from my Trust Wallet without the transaction actually going through. What should I do now to get lost crypto back

Integartion

Hi. I want to integrate trustwallet with my website. Is there API or any other way of doing this?
Let me know please

Better Building instructions

More detailed building instructions, on a separate file. Currently some instructions are in the Contributing, some in the Linux section.

Add Validator Onboarding

Create a section for Platform and list the process of onboarding a validator:

  • in each assets/blockchain/<chain> /validators/list.json, add a name, id, description, and website`.
  • in each assets/blockchain/<chain>/validators/assets/<validator_address> add a 256x256 pixel logo.png file.

Add detail RPC requirement

  • query account / address balance
  • query sent / received transactions for an account / address
  • query transaction details
  • query fee / nonce for sending transaction
  • query blockchain status (block height)
  • send raw transaction

filecoin broadcast transaction error "signature did not match"

After Filcoin signs the transaction, use Filecoin.MpoolPush RPC to broadcast the transaction error, error message"{"jsonrpc":"2.0","id":1,"error":{"code":1,"message":"signature did not match"}}"

sign json response:{"Message":{"From":"f1afn74ati4fxle3r4wts6hy6zhz6bmhhqkl4smma","GasFeeCap":"232340646288838001506612","GasLimit":595335,"GasPremium":"54083036854064","Nonce":0,"To":"f1icys7esrj6h5htoar45qv5hjhblniyvci5ygcqq","Value":"232284873704446901628976"},"Signature":{"Data":"lEbB9ClQVsdiwg4inbX3unwKf3/tWsPuTZxeDf7nxaQqI4WFSqFkHXVQxQ/zFcSoFZd7YepUl3DnXXoqF3qytAE=","Type":1}}

Update BlockAtlas docs

BlockAtlas structure has been changed a lot, update according to latest changes and explain platform interfaces concept.

[Bitcoin] pass window.bitcoin object to dapp browser

Is your feature request related to a problem? Please describe.
Hi, our Atomic Swap dapp interact with bitcoin blockchain, but now trustwallet doesn't have any API for this

Describe the solution you'd like
would be great if trustwallet's dapp browser pass window.bitcoin object to dapp

simplest example:

window.bitcoin.address
>16bFRqtBivrvdBi37kxPtiSUH5qWwaoH15

also woukd be great if <a href="bitcoin:16bFRqtBivrvdBi37kxPtiSUH5qWwaoH15?amount=0.001">pay 0.001</a> works too (or somt like window.bitcoin.send...

Describe alternatives you've considered
(i tried deep link https://link.trustwallet.com/send... but no success ).

Additional context

Better wallet core integration guide / example app

  • How to use wallet core library in iOS/macOS/Android/C++ app
  • Create HD wallet
    • introduce BIP39/BIP44
  • Get private key by path / coin
  • Get BTC/ETH/BNB address
  • Sign tx, explain each field in signing input, how to get them from RPC
    • BTC
    • ETH
    • BNB

USMilCoin UMC

Good day,
I think i made a mistake somehow in uploading logo for Token UMC.
How do i know if my logo went through or not.

Use Multilingual in Trust Wallet

Hi Team,
As we are working with the iOS SDK. We need to change the language of the mnemonic show to the user and pass the same to the SDK base on the user-selected language(English, Chinese, Japanese). So Please give us the break in how we will do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.