Demo program for implementing a token transfer that can delegate and execute both on-chain and in the ephemeral rollup.
To run tests on the devnet, use the following command:
anchor test --skip-local-validator --skip-build --skip-deployTo run tests using a local ephemeral validator, follow these steps:
Ensure you have the ephemeral validator installed globally:
npm install -g @magicblock-labs/ephemeral-validatorRun the local validator with the appropriate environment variables:
ACCOUNTS_REMOTE=https://rpc.magicblock.app/devnet ACCOUNTS_LIFECYCLE=ephemeral ephemeral-validatorACCOUNTS_REMOTE point to the reference RPC endpoint, and ACCOUNTS_LIFECYCLE should be set to ephemeral.
Execute the tests while pointing to the local validator:
PROVIDER_ENDPOINT=http://localhost:8899 WS_ENDPOINT=ws://localhost:8900 anchor test --skip-build --skip-deploy --skip-local-validatorThis setup ensures tests run efficiently on a local ephemeral rollup while connecting to the devnet.