Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Sign then Send for Tron network #95

Closed
trongvuong1902 opened this issue May 17, 2021 · 3 comments
Closed

Sign then Send for Tron network #95

trongvuong1902 opened this issue May 17, 2021 · 3 comments

Comments

@trongvuong1902
Copy link

Coin not supported

@hewigovens
Copy link
Contributor

It should work? Can you share your sample code?

@trongvuong1902
Copy link
Author

trongvuong1902 commented May 19, 2021

      let a = TronSigningInput.with{
        $0.transaction = TronTransaction.with{
            $0.triggerSmartContract = TronTriggerSmartContract.with{
                $0.data = "abc".data(using: .utf8)!
                $0.contractAddress = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
                $0.callValue = 1
                $0.ownerAddress = "TVmCnJ1Apw42PMJwwMnJwTZn6cfMeicG7M"
            }
        }
    }
    
    TrustSDK.signers.tron.signThenSend(input: a) { result in
        switch result {
        case .success(let hash):
            print(hash)
        case .failure(let error): print(error.localizedDescription)
        }
    }

@trongvuong1902
Copy link
Author

Please take a look. Thanks @hewigovens

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants