deploy.ts 684 B

12345678910111213141516171819202122
  1. // Migrations are an early feature. Currently, they're nothing more than this
  2. // single deploy script that's invoked from the CLI, injecting a provider
  3. // configured from the workspace's Anchor.toml.
  4. const anchor = require("@coral-xyz/anchor");
  5. module.exports = async function (provider) {
  6. // Configure client to use the provider.
  7. anchor.setProvider(provider);
  8. // Add your deploy script here.
  9. async function deployAsync(exampleString: string): Promise<void> {
  10. return new Promise((resolve) => {
  11. setTimeout(() => {
  12. console.log(exampleString);
  13. resolve();
  14. }, 2000);
  15. });
  16. }
  17. await deployAsync("Typescript migration example complete.");
  18. };