Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug: Splitter Contract (Code ID 1215) Fails with AmountExceededHundredPrecent #124

@Rion4

Description

@Rion4

Hello Andromeda Team,

I'm a participant in the aOS Global Buildathon and have encountered a critical bug with the splitter ADO on the testnet (galileo-4).

Environment:
andr-cli: v2.0.0
Chain: testnet / galileo-4

Steps to Reproduce:

  1. Get the splitter Code ID: os adodb getcodeid splitter (returns 1215).
  2. Run the wasm instantiate command with percentages summing to 99.

Failing Command:
wasm instantiate 1215 '{"recipients":[{"recipient":{"address":"andr1jautrmaerzy5rz6293xwd5q0nxtljpua0xk60j"},"percent":"50"},{"recipient":{"address":"andr1wmfht39848mrnyz7xpx33tadmz4n3py6d9wgcg"},"percent":"49"}],"kernel_address":"andr14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9shptkql"}' --label "MyTest"

Expected Result:
The contract should instantiate successfully.

Actual Result:
The command fails with the error AmountExceededHundredPercent, which is incorrect as 50 + 49 = 99.

Error: ... AmountExceededHundredPrecent: instantiate wasm contract failed ...

This seems to be a bug in the contract's percentage validation logic. Thank you for looking into this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions