(Waellet) Problems with calling stateful function

Hello all,

I’m trying to build a simple aepp with react and waellet (using create-react-app).

Here’s the code for anyone wanting to check - GitHub - axiomatic-aardvark/React-Waellet: A react implementation of Aeternitys Waellet with basic functionality

The static functions I call on the deployed contract (contract address: ct_2vESASvwXNxMoyi4LMFw7uyMp8P1H9BzsoE87SFyuSxA5F68q5) work perfectly.

Also all of the functions work as intended when I call them from a simple Aeproject with the js sdk.

But when I try to call a stateful function (new_contract) from the react project, like this:

const newContract = async () => {
	await window.Aepp.request
		.contractCall({
			source: contractSource,
			address: deployedContractAddr,
			method: 'new_contract',
			params: Object.values(newContractArgs),
			amount: 1000000,
		})
		.then(result => {
			console.log('NEW CONTRACT');
			const res = result.decodedResult;
			console.log(res);
		});
};

It gives me

Transaction cannot be processed

and when I click “See transaction details” it opens 10+ beowser tabs which all say “Your file was not found”

Any help would be greatly appreciated!
Thanks in advance.

@philipp.chain if you’ve got a minute :confused:

I’ll ask @bruteforce.chain to help you, he is author of waellet :slight_smile:

1 Like

We’ll check this and come back to you. :slight_smile:

2 Likes

Can you also provide the version of waellet you are using and your browser?

2 Likes

Thank you for answering,

my Waellet is v.0.2.3beta, I downloaded it a couple of days ago.

And I’m using Brave Browser.

Have you checked this example: Waellet Aepp Boilerplate

I haven’t had the time to check your code, but calling a stateful entrypoint in the example above works just fine.

1 Like

Yes, I followed that example as closely as possible

We identified a problem with passing bytes(n) as a parameter to a contract call.

I presume this was causing the issue. Its on our backlog now and will be addressed shortly.

2 Likes

Thank you for the information, I’m looking forward to the fix :smile: