Skip to content
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

Support constructing custom transaction to deploy contracts #232

Open
Keith-CY opened this issue Apr 12, 2023 · 6 comments
Open

Support constructing custom transaction to deploy contracts #232

Keith-CY opened this issue Apr 12, 2023 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Keith-CY
Copy link
Member

Is it easy to construct custom deployment transactions? Many of .bit's deployment transactions have additional steps that other dapp developers will inevitably have to implement in order to implement Witness or SMT-based storage, which can make the transactions very complex

I'm going to collect more cases to make this feature clear

@Keith-CY Keith-CY added the documentation Improvements or additions to documentation label Apr 12, 2023
@Keith-CY Keith-CY self-assigned this Apr 12, 2023
@Keith-CY
Copy link
Member Author

@PainterPuppets
Copy link
Contributor

PainterPuppets commented May 31, 2023

An idea to manage multi-transactions

There are ways to build the multi-transaction json file, and then kuai can support signing / sending of this multi-transaction file

{
    transatcions: [
	{
		raw: rawtransatction,
		signatures: {}
		status: 'pending' | 'commited',
		txHash?: string,
	},
	{
		raw: {
			cell_deps: [
				`Reflect(transactions[0]['outputs'][1])`,
				`Reflect(transactions[0]['outputs'][2])`,
			],
			others…
		},
		signatures: {}
		status: 'pending' | 'commited',
		txHash?: string,

	},
	{
		raw: {
			inputs: [
				`Reflect(transactions[1]['outputs'][1])`,
			]
		},
		signatures: {}
		status: 'pending' | 'commited',
		txHash?: string,
	}
    ]
},
multisig_config: {
},
others_config: {
},

@Keith-CY
Copy link
Member Author

Keith-CY commented Jun 6, 2023

An idea to manage multi-transactions

There are ways to build the multi-transaction json file, and then kuai can support signing / sending of this multi-transaction file

{
    transatcions: [
	{
		raw: rawtransatction,
		signatures: {}
		status: 'pending' | 'commited',
		txHash?: string,
	},
	{
		raw: {
			cell_deps: [
				`Reflect(transactions[0]['outputs'][1])`,
				`Reflect(transactions[0]['outputs'][2])`,
			],
			others…
		},
		signatures: {}
		status: 'pending' | 'commited',
		txHash?: string,

	},
	{
		raw: {
			inputs: [
				`Reflect(transactions[1]['outputs'][1])`,
			]
		},
		signatures: {}
		status: 'pending' | 'commited',
		txHash?: string,
	}
    ]
},
multisig_config: {
},
others_config: {
},

I think it is feasible, a custom script can be added to manipulate temporary transactions before sending it onto the chain

@Keith-CY
Copy link
Member Author

Keith-CY commented Jun 14, 2023

Collect references first @Keith-CY @zhengjianhui

@Keith-CY
Copy link
Member Author

Keith-CY commented Aug 8, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: 🔖 Ready
Development

No branches or pull requests

3 participants