near / near-cli

General purpose command line tools for interacting with NEAR Protocol
https://docs.near.org
MIT License
193 stars 93 forks source link

Support base64 encoded files as arguments (fixes linux ulimit issues) #937

Open TrevorJTClarke opened 2 years ago

TrevorJTClarke commented 2 years ago

Is your feature request related to a problem? Please describe. On linux, submitting long args list using -base64 flag can actually require more bytes than are allowed by system. It is not possible to sign transactions without a different approach (similar to deploying wasm)

Describe the solution you'd like See the following line:

This could get upgraded to using a similar file read pattern like when deploying:

 const actions = <span class="error">[transactions.deployContract(readFileSync(options.wasmFile))]</span>;

So it could be like:

 const base64Args = readFileSync(options.base64File);

Describe alternatives you've considered I have tried to utilize xargs & change the file limits, however it will not work for larger data. (im storing bytes of a smart contract for doing upgrades via DAOs)

Additional context You can see some CLI commands we're testing: https://github.com/near-daos/sputnik-dao-contract/pull/111