-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use ink tests with custom environment #1935
Comments
It is a good spot we should make If you are using some custom node configuration, can you please provide the link so I can reproduce the issue? |
Essentially, yes, Off-chain testing environment makes an assumption about this in order to generate a set of default accounts. I need to think about the proper way to make |
Yeah. Probably |
After some investigation, it would be difficult to support non-standard generic account types in both unit and e2e testing. This is due to the fact that the testing environment assumes Making this generic can be done with:
The second approach is less feasible because the E2E framework heavily relies on sr25519 for signing transactions, and uses default polakdot config. Making this customisable would probably require a lot of configuration on the developer side, something that we want to avoid. If you want to test your contracts with non-32-byte |
How you suggest I do that? @SkymanOne |
I'm trying to write a smart contract for a custom blockchain with AccoutId of type
[u8; 20]
. Here's my environmentI'm unable to use this within ink tests since
From<[u8; 32]>
is hardcoded into functions such as set_callee and set_contract.Is there a workaround for it or ink! just doesn't support other account formats yet?
I'm also unable to instantiate a contract (instantiate) and ultimately sign transactions since that's also hardcoded to use Keypair signer which is a concrete type wrapper over
[u8; 32]
as well.Here's how I'm writing the e2e tests by the way: link
The text was updated successfully, but these errors were encountered: