Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Shinto2000
    @Shinto2000_twitter
    at first i left what was posted as but still same return: parameters: [[transferTo],[transferAmount]]
    Ankit Yadav
    @ankit-yadv

    Hi @Shinto2000_twitter,

    If you are separating your declarations with commas, you should not repeat let. You should either remove let from each declaration, or use semi-colons instead.

    Shinto2000
    @Shinto2000_twitter
    In doing so, i got this message:
    MacBook-Pro:OST $ node award.js
    {"success":false,"err":{"code":"BAD_REQUEST","msg":"At least one parameter is invalid or missing. See \"err.error_data\" array for more details.","error_data":[{"parameter":"to","msg":"Invalid to. Please inspect for what is being sent, rectify and re-submit."}],"internal_id":"s_et_b_2"}}
    $
    Shinto2000
    @Shinto2000_twitter
    pls disregard, i got mine working.
    $ node award.js
    {"success":true,"data":{"result_type":"transaction","transaction":{"id":"bd2f6e12-1cb7-4fc6-a26d-92cc909cc420","transaction_hash":null,"from":null,"to":"0x1c68fa1f47e290e94c6117be8429da7b8803937e","nonce":null,"value":null,"gas_price":"1000000000","gas_used":null,"transaction_fee":null,"block_confirmation":null,"status":"CREATED","updated_timestamp":1562465543,"block_timestamp":null,"block_number":null,"rule_name":null,"meta_property":{},"transfers":[{"from":"0x1c68fa1f47e290e94c6117be8429da7b8803937e","from_user_id":"9931e53a-83e6-4f9c-92c2-1e4319eab349","to":"0x18b1c66cb41c952c5982465588cf680b28432232","to_user_id":"a527c4d6-f572-458c-bf31-eba264cb5927","amount":"1000000000000000000000","kind":"transfer"}]}}}
    schlinkmumpitz
    @schlinkmumpitz

    Hi everyone, just wanted to point you to some syntactical errors in the example code of section "Execute a transaction" (at least for node.js).

    correct form would be:

    let transferTo = "0xa31e988eebc89d0bc3e4a9a5463545ea534593e4",
        transferAmount = '1',
        raw_calldata = JSON.stringify({
                method: "directTransfers",
                parameters: [[transferTo],[transferAmount]]
        }),
        meta_property = {
            "name": "transaction_name" , //like, download
            "type": "user_to_user", // user_to_user, company_to_user, user_to_company
            "details" : "" // memo field to add additional info about the transaction
        },
        executeParams = {
            user_id: "ee89965c-2fdb-41b5-8b6f-94f441463c7b",
            to: "0xe37906219ad67cc1301b970539c9860f9ce8d991",
            raw_calldata: raw_calldata,
            meta_property: meta_property
        };

    i saw similar problems at various positions. if you just copy&paste the examples you will get errors/warnings concerning variable declarations

    Ankit Yadav
    @ankit-yadv
    Hi @schlinkmumpitz ,
    Thanks for pointing out these errors, we will be updating dev.ost.com asap.
    pyramus
    @pyramus
    @ankit-yadv Yes, I've noticed a lot of similar syntax errors in examples throughout the documentation.
    Daniel Pham
    @nguyenpc
    @ankit-yadv I see there is a function that allow us to execute a transaction by scanning a QR code. could you guide us how we can create a QR-transaction to test that feature?
    pyramus
    @pyramus
    @Shinto2000_twitter (or anyone else) did you also manage to play around with company to user transfers yet?
    I'm unable to add transfer details to a direct transfer (Company->User) with the 'meta_property' parameter. I know this should be possible from the documentation, but examples are using different syntax (and most even commented out this parameter).
    I tried everything but just keep getting this error telling me the parameter is invalid.
    {"success":false,"err":{"code":"BAD_REQUEST","msg":"At least one parameter is invalid or missing. See \"err.error_data\" array for more details.","error_data":[{"parameter":"meta_property","msg":"Invalid parameter meta_property. Please ensure the input is well formed or visit https://dev.ost.com/platform/docs/api for details on accepted datatypes for API parameters."}],"internal_id":"v_ap_4"}}
    Ankit Yadav
    @ankit-yadv

    Hi @pyramus,

    can send me your code snippet of execute transaction parameters?

    pyramus
    @pyramus
    I'm using node. And the example on https://dev.ost.com/platform/docs/api/?javascript#transaction-object is completly different for company to user transfer.
    it works fine until I try to add the meta_property details
    Ankit Yadav
    @ankit-yadv
    What did you add in meta_property?
    Sharing the transaction parameters would help me solve your issue @pyramus
    pyramus
    @pyramus
    First I tried the example, then all sorts of variants. Checked here:
    meta_property spec in API doc
    so if you are able to get this example code attached to the transfer, please let me know
    meta_property = { "name": "transaction_name", "type": "company_to_user", "details" : ""}
    Ankit Yadav
    @ankit-yadv

    Hi @pyramus,

    can you try running your code with this value of meta_property?

    `
    meta_property:

    { "name": "transaction_name",
    "type": "company_to_user",
    "details": "Some more details about transactions"
    }
    `

    pyramus
    @pyramus
    that wont work. syntax is incorrect for node var declaration
    Daniel Pham
    @nguyenpc

    @ankit-yadv

    Hi @nguyenpc,

    You can follow this execute transaction guide here: https://dev.ost.com/platform/docs/guides/execute_transaction/#generating-qrcode-with-transaction-data

    Thank you, I generated a QR code as guided, the app seems regconize the tx, however it crashed after scanning the QR code.

    is there any other channel where we can submit our issue (i.e. Github)?

    pyramus
    @pyramus
    i have to use =
    for the rest I don't see any real difference in the value of your code @ankit-yadv
    but just to confirm: the exact same error happen when I put a non-empty string inside "details". obviously ;-)
    pyramus
    @pyramus
    @ankit-yadv
    let meta_property = { "name": "Signup Bonus", "type": "company_to_user", "details": "Credit to get started." }; executeParams = { user_id: companyUserId, to: contractRuleAddress, raw_calldata: raw_calldata, // meta_property: meta_property };
    executes correctly / but crashes when i uncomment meta_property
    this is exactly like the API specs, but please try to run your own examples from Node.js and you'll see it will fail
    Ankit Yadav
    @ankit-yadv
    @pyramus,
    I am trying these codes, I will update you once we fix these issues.
    pyramus
    @pyramus
    yeah sure. I would recommend to walk through some more of the Node examples, because there seems to be a lot of syntax errors as well (as me and @schlinkmumpitz mentioned). I really love the amount of examples you provided but it's a missed opportunity when they don't run ;-)
    Ankit Yadav
    @ankit-yadv

    Hi @nguyenpc,

    You can create a ticket here https://help.ost.com/support/home

    Daniel Pham
    @nguyenpc

    Hi @nguyenpc,

    You can create a ticket here https://help.ost.com/support/home

    I've submitted a ticket, thanks.

    Shinto2000
    @Shinto2000_twitter
    @pyramus Yes, my tx's were company-to-user, i had to make sure you get the correct rules address in first (to
    Required Rule address. You can get the rule address by using list all rules API.)

    i got the same error until i got the Rules address from 'Direct Transfer', and placed into the (to)

    let executeParams = {
    user_id: "9931e53a-83e6-4f9c-92c2-1e4319eab349",
    to: "0xe2c560d01f28d2962c934c747234f1453170fae8",
    raw_calldata: raw_calldata,
    //meta_property: meta_property
    };

    Ankit Yadav
    @ankit-yadv

    Thanks @Shinto2000_twitter for mentioning rules address, the to address is the address of rule that you want to execute.

    @pyramus you can also follow this execute transaction guide, it shows a step by step process to execute transactions.

    @pyramus let us know if the above solves your error.
    pyramus
    @pyramus
    Well I doubt anybody here actually read my intial issue. It's about adding meta_property details, which nobody is capable of doing.
    @ankit-yadv @Shinto2000_twitter please show me an actual example where you've been able to attach meta_property details with a transfer in node
    @ankit-yadv no. this is not node.

    @Shinto2000_twitter yeah already know that. As said before,

    let meta_property = { "name": "Signup Bonus", "type": "company_to_user", "details": "Credit to get started." }; executeParams = { user_id: companyUserId, to: contractRuleAddress, raw_calldata: raw_calldata, // meta_property: meta_property };
    executes correctly / but crashes when I uncomment meta_property line
    this is exactly like the API specs, but please try to run your own examples from Node.js and you'll see it will fail

    Ankit Yadav
    @ankit-yadv

    Hi @pyramus,

    I have updated the sample code for node.js. They are working with meta_property included.
    https://dev.ost.com/platform/docs/api/?javascript#execute-a-transaction

    The only constraint with meta_property is, it should have value for all three attributes. None of the attributes can be empty. meta_property as a parameter is optional.
    Shinto2000
    @Shinto2000_twitter
    Hello team, wanted to see if there was a way to 'automating' the process of (inputing in the user email address in the admin wallet page). Is there a way you guys could share what the front/backend call looks like? (use case - we have a test economy, but i have to manually enter in each user's email address, would prefer we have a webpage where individual users can input in and receive a download wallet app email)
    pyramus
    @pyramus
    Thanks for the fix @ankit-yadv, the code now works.
    Perhaps you should also update the API documentation and mention that meta_property is actually NOT required, but in case it is used the child attributes ARE indeed all required and cannot be empty?
    alt
    pyramus
    @pyramus
    @ankit-yadv I also found something else: using the full stop "." character inside the string child attribute details is not allowed and will break the request. Might be handy to mention, because currently only a max length is specified as limitation to this specific child attribute in the API documentation.
    alt
    pyramus
    @pyramus
    Last but not least: please notice that ^ is not the exponentation operator, but the XOR operator in Javascript. So this (uncommented) part in the Node.js example won't work as expected. You should use Math.pow (or ** more recently) instead.
    alt
    Ankit Yadav
    @ankit-yadv
    Thanks for your inputs @pyramus. We will be reflecting changes soon.
    ldumaine
    @ldumaine
    Hello! Is this the right place for feedback about the wallet application?
    When you initialize the wallet you have to chose a pin code..