Skip to content

Added "transfer()" commands to token cost analysis#235

Merged
auroter merged 1 commit intodevelopfrom
task/sean/estimateTransfer
Jul 24, 2023
Merged

Added "transfer()" commands to token cost analysis#235
auroter merged 1 commit intodevelopfrom
task/sean/estimateTransfer

Conversation

@auroter
Copy link
Copy Markdown
Contributor

@auroter auroter commented Jul 19, 2023

To test:

  1. In Postman Dashboard API or Postgres, ensure that the "transfer(address,uint256)" command is allowed for the String Avalanche USDc contract. I can send you some if you don't have any yet.

  2. In Postman String-API Get a quote for the transfer, i.e.:

{
	"userAddress": "{{wallet_address}}",
    "assetName": "String DEV Exchange Fuji",
	"chainID": 43113,
    "actions": [
        {
        "contractAddress": "0x671E35F91Cc497385f9f7d0dFCB7192848b1015b",
        "contractFunction": "transfer(address,uint256)",
        "contractReturn": "",
        "contractParameters": ["{{wallet_address}}","2 eth"],
        "txValue": "0",
        "gasLimit": "800000"
        }
    ]
}
  1. Note that the TokenCostUSD reflects the amount being transferred

  2. Execute the quote and verify that the TX is successful

Copy link
Copy Markdown

@brianspierce brianspierce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Followed test procedure and verified that endpoint behaves as expected.

@auroter auroter merged commit 536bcde into develop Jul 24, 2023
@auroter auroter deleted the task/sean/estimateTransfer branch July 24, 2023 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants